Is it safe to translate trust_level_N and remove underscores

(Anton) #1

I can see there are 5 keys to be translated:

groups.default_names.trust_level_N where N is 0 to 5.

What confuses me is that even in original English language the translation looks more like an identifier rather than like a human readable string, e.g. trust_level_0 and not Trust level 0.

So I wonder how safe it is to translate the string to something like уровень доверия 1 (Russian) instead of уровень_доверия_1 - what will it affect and what might break if I remove underscores and change the language? Should I also change anything else simultaneously if I translate these strings?

Thank you in advance.

(Gerhard Schlager) #2

TL;DR Yes and no. Removing the underscore is allowed. Using a space isn’t!

Group names must adhere to the same restrictions as usernames. Those are:

  • min length as configured with min_username_length (default: 3)
  • max length as configured with max_username_length (default: 20)
  • only the following characters are allowed: A-Za-z0-9_ (= case-insensitive alphanumeric characters and underscore)
  • must start with one of the following characters: A-Za-z0-9 (= case-insensitive alphanumeric characters)
  • and of course, using the same name for more than one group is not allowed

If you don’t follow those rules, the English fallback will be used instead of your (faulty) translation.

js.category.everyone_permission in client.en.yml should have the same translation as groups.default_names.everyonein server.en.yml. Nothing breaks if they aren’t the same, but it could be confusing…

(Anton) #3

Hm… I wonder why is there no a “Caption” for every level which is separate from its internal representation and could be translated normally just like any other string.

Btw, in the badges query (in admin gui) I can only see numbers e.g. 4, not identifiers e.g. trust_level_4. So it’s not clear why can’t it be translated freely.