You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the functionality to switch between languages. This also includes making sure that every string is correctly defined and translated for each language.
Talk with @Robin481 about the design. Maybe create a small mockup to show.
TODO:
Check the languages.yml files for any mistakes
Make sure both german and english are fully translated
Set the design
Implement the language selector
Make the language selector automagically detect the available languages and display all those options
Tests
Ⓜ️Ⓜ️
Workflow
To improve code readability and maintainability, follow these guidelines:
Check for Hardcoded Strings:
Open the file and identify any hardcoded strings or overly complicated translations. Replace them with appropriate translation methods.
Model Attributes in Forms:
Use f.label :attr_name for form labels. Add the translation under activerecord.attributes.{modelname}.{attrname} in the YML file.
Model Attributes Outside Forms:
For model attributes outside forms, use {model_instance}.human_attribute_name(:attr_name) or {ModelClass}.human_attribute_name(:attr_name).
Example: @person.human_attribute_name(:person_roles) or Person.human_attribute_name(:person_roles).
Refer to the documentation for more details.
Link Text:
For link texts, check if a link action helper can be used. Refer to the ActionsHelper documentation for guidance.
Other Translations:
For other types of text, consider using lazy lookup translations or standard translation methods as outlined in the Rails I18n guide.
The text was updated successfully, but these errors were encountered:
Add the functionality to switch between languages. This also includes making sure that every string is correctly defined and translated for each language.
Talk with @Robin481 about the design. Maybe create a small mockup to show.
TODO:
Workflow
To improve code readability and maintainability, follow these guidelines:
Check for Hardcoded Strings:
Open the file and identify any hardcoded strings or overly complicated translations. Replace them with appropriate translation methods.
Model Attributes in Forms:
Use
f.label :attr_name
for form labels. Add the translation underactiverecord.attributes.{modelname}.{attrname}
in the YML file.Model Attributes Outside Forms:
For model attributes outside forms, use
{model_instance}.human_attribute_name(:attr_name)
or{ModelClass}.human_attribute_name(:attr_name)
.Example:
@person.human_attribute_name(:person_roles)
orPerson.human_attribute_name(:person_roles)
.Refer to the documentation for more details.
Link Text:
For link texts, check if a link action helper can be used. Refer to the ActionsHelper documentation for guidance.
Errors
https://stackoverflow.com/a/17935975
Other Translations:
For other types of text, consider using lazy lookup translations or standard translation methods as outlined in the Rails I18n guide.
The text was updated successfully, but these errors were encountered: