Project

General

Profile

Actions

Defect #37072

closed

Capitalization issue for object names in I18n keys: button_save_object, button_edit_object, and button_delete_object

Added by Alexander Meindl over 2 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
I18n
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

remove_downcase_for_button_object_name.patch (4.53 KB) remove_downcase_for_button_object_name.patch Alexander Meindl, 2022-05-04 10:50
Do_not_downcase_labels.patch (7.38 KB) Do_not_downcase_labels.patch Patch for Redmine 5 Thomas Löber, 2023-01-10 14:40
clipboard-202410210036-l9aqv.png (109 KB) clipboard-202410210036-l9aqv.png Go MAEDA, 2024-10-20 17:36
clipboard-202410210041-egrrp.png (103 KB) clipboard-202410210041-egrrp.png Go MAEDA, 2024-10-20 17:41
37072.patch (7.93 KB) 37072.patch Go MAEDA, 2024-10-20 17:47

Related issues

Related to Redmine - Patch #36905: German translation update for 5.0-stableClosedGo MAEDA

Actions
Has duplicate Redmine - Defect #38233: Broken spelling in context menus Closed

Actions
Actions #1

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.

Actions #2

Updated by Go MAEDA over 2 years ago

  • Related to Patch #36905: German translation update for 5.0-stable added
Actions #3

Updated by der gl0wn over 2 years ago

Is it possible to foresee approximately when these changes will be deployed live here?

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Thomas Löber almost 2 years ago

I have extended Alexander's patch to include the new downcased labels from Redmine 5.

Actions #7

Updated by Go MAEDA 2 months ago

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.

Actions #8

Updated by Go MAEDA 2 months ago

Actions #9

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
Actions #10

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.

Actions #11

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.

Actions #12

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.

Actions #13

Updated by Marius BĂLTEANU about 2 months ago

  • Status changed from Resolved to Closed
Actions #14

Updated by Go MAEDA about 1 month ago

  • Has duplicate Defect #38233: Broken spelling in context menus added
Actions

Also available in: Atom PDF