Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Splitting up i18n enabled text into parts leads to incorrect grammar in languages such as German #2584

Closed
nebulon42 opened this issue Dec 25, 2021 · 0 comments · Fixed by #2609

Comments

@nebulon42
Copy link
Contributor

Expected Behavior

I'm able to provide a grammatically correct translation for all i18n enabled text.

Current Behavior

Splitting up text like in form titles makes it impossible to provide grammatically correct translations.
Example: frontend/app/views/repositories/new.html.erb

<h2><%= I18n.t("actions.new_prefix") %> <%= I18n.t("repository._singular") %>  <span class="label label-info"><%= I18n.t("repository._singular") %></span></h2>

Here the title is split up into "actions.new_prefix" and "repository._singular".

Bildschirmfoto vom 2021-12-25 22-34-14
In the attached screenshot you see a form title which in English would read "New Repository". In German this is now "Neu Aufbewahrungsort" which is incorrect. It should be "Neuer Aufbewahrungsort" to be grammatically correct.

Possible Solution

Do not split up text into parts. For the example file frontend/app/views/repositories/new.html.erb change to

<h2><%= I18n.t("actions.new_repository") %> <span class="label label-info"><%= I18n.t("repository._singular") %></span></h2>

This leads to more text to translate but only with that it is possible to provide grammatically correct translations.

Context

Grammatically incorrect translations just look ugly.

Your Environment

  • Version used: 3.1.1
  • Environment name and version (e.g. Chrome 39, node.js 5.4): N/A
  • Operating System and version (desktop or mobile): N/A
  • Link to your project: N/A
nebulon42 added a commit to nebulon42/archivesspace that referenced this issue Jan 14, 2022
nebulon42 added a commit to nebulon42/archivesspace that referenced this issue Jan 14, 2022
nebulon42 added a commit to nebulon42/archivesspace that referenced this issue Jan 14, 2022
nebulon42 added a commit to nebulon42/archivesspace that referenced this issue Jan 15, 2022
@nebulon42 nebulon42 changed the title Splitting up i18n enabled text into parts leads to incorrect grammar in languages such as German i18n: Splitting up i18n enabled text into parts leads to incorrect grammar in languages such as German Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant