Defect #37072
closedCapitalization issue for object names in I18n keys: button_save_object, button_edit_object, and button_delete_object
0%
Description
Introduced with #34494 for translation :button_save_object the object_name uses label_query with downcase.
In German (and most likely other languages, too) the translation for label_query has to stay with an upper letter. abfrage speichern
is currently generated with downcase, but it should be "Abfrage speichern
"
The attached patch removes downcase from :button_save_object.
Files
Related issues
Updated by Alexander Meindl over 2 years ago
Found another problem with the same change for deleting issues. #31278 uses downcase for :label_issue. This cannot be used for German. In German it has to be Ticket
not ticket
.
Actually this problem exists with:
- :button_save_object
- :button_edit_object
- :button_delete_object
For each of these labels object_name uses downcase, which makes Redmine looks very strange in German (I'd not say unusable - but very unprofessional).
If we want to stick with :button_*_object, we need a lower case and an upper case label for all objects. E.g. label_issue and label_Issue. label_query and label_Query. But which language need the lower label and which the upper label? Because of this (unsolvable?) question, it would be better to revert :button_*_object introduction. Maybe switch to buttons with isolated label, as label_save_issue and label_save_query.
Please ignore my patch, it would only remove downcase for label_query, which does not solve all problems related to :button_*_object.
Updated by Go MAEDA over 2 years ago
- Related to Patch #36905: German translation update for 5.0-stable added
Updated by der gl0wn over 2 years ago
Is it possible to foresee approximately when these changes will be deployed live here?
Updated by Alexander Meindl almost 2 years ago
Is nobody interested to solve this annoying bug? This bug is not even on the roadmap. Easiest solution would be to revert #34494.
Updated by Pan Tau almost 2 years ago
We have the same problem.
For English or other languages that do not care about Uppercase the current solution may work,
but all other languages have an problem with this.
Please let the users decide how to write it right
and add for the cases of #34494, #31278 and similar tickets new labels in the "language".yml
und stop the downcasing of labels.
Updated by Thomas Löber almost 2 years ago
I have extended Alexander's patch to include the new downcased labels from Redmine 5.
Updated by Go MAEDA 2 months ago
- File clipboard-202410210036-l9aqv.png clipboard-202410210036-l9aqv.png added
- File clipboard-202410210041-egrrp.png clipboard-202410210041-egrrp.png added
- Target version set to 6.0.0
Sorry for the delay, I have written a new patch to fix this issue.
The new patch still downcases the string but uses the upcase_first
method to correctly capitalize only the first letter of the string.
l(:button_save_object, object_name: l(:label_query).downcase).upcase_first
This approach avoids unintended capitalization in the middle of the string in some languages such as English.
I am setting the target version to 6.0.0.
Updated by Go MAEDA about 2 months ago
- Subject changed from button_save_object should not downcase label_query to Capitalization issue for object names in I18n keys: button_save_object, button_edit_object, and button_delete_object
Updated by Marius BĂLTEANU about 2 months ago
- Status changed from New to Resolved
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
I've committed a fix with a slight change. I've preferred to use capitalize
instead of downcase
and upcase_first
, please let me if this works for you.
Updated by Alexander Meindl about 2 months ago
Hi Marius,
this looks good for me. With German language there are no problems with your solution.
Updated by Marius BĂLTEANU about 2 months ago
- Target version changed from 6.0.0 to 5.0.10
Thanks! I'm going to merge this to stable branches.
Updated by Marius BĂLTEANU about 2 months ago
- Status changed from Resolved to Closed
Updated by Go MAEDA about 1 month ago
- Has duplicate Defect #38233: Broken spelling in context menus added