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

Added translations for Send Test Mail feature #156

Merged
merged 7 commits into from
Jul 26, 2020

Conversation

askvortsov1
Copy link
Member

Companion PR to flarum/framework#2023

Copy link
Contributor

@franzliedke franzliedke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort keys alphabetically!

@rob006
Copy link
Contributor

rob006 commented Feb 28, 2020

Please sort keys alphabetically!

This requirement is really annoying for translators. Order of strings may give some hints about the context for specific phrase. Forcing alphabetical order is just more work for devs to create less useful resource...

@franzliedke
Copy link
Contributor

@rob006 I understand your concern, but want to provide some nuance:

  • Ordering alphabetically is the only sensible, objective way of having consistency in a language file (and we even had an automatic linter for a while enforcing this, IIRC). Since this is a place that is touched by almost everyone changing or adding new features, any other "convention" for ordering is bound to be pointless and things will devolve into a mess. I've seen this happen.
  • We try to provide a bit of context through nesting and inline comments. A lot of thought went into this overall structure, trust me.

It's a trade-off, as with many things. So far, I personally have been very happy with it.

@rob006
Copy link
Contributor

rob006 commented Feb 28, 2020

Ordering alphabetically is the only sensible, objective way of having consistency in a language file

It is not the only one, it is just the simplest one. Ordering by file name and line number is also consistent, but in addition it is also natural (it is common convention for extractors generating pot files).

It is also debatable whether you need convention here at all. This file is created by humans for humans, why do you need to follow rule typical for machines? You don't order methods in your classes alphabetically...

So far, I personally have been very happy with it.

I'm guessing you're not using these files. :P

@askvortsov1
Copy link
Member Author

Resolved by moving the translations to the api section, where they belong (this section is for emails that are sent only). I left subject before body, as that is the convention with the rest of these.

@askvortsov1 askvortsov1 requested a review from franzliedke March 22, 2020 02:45
@askvortsov1 askvortsov1 force-pushed the as/send_test_mail_translations branch from 912201a to 1e2c822 Compare July 26, 2020 20:57
@askvortsov1 askvortsov1 merged commit ea79027 into flarum:master Jul 26, 2020
@askvortsov1 askvortsov1 deleted the as/send_test_mail_translations branch July 26, 2020 20:59
askvortsov1 added a commit that referenced this pull request Mar 11, 2022
* Added translations for Send Test Mail feature
askvortsov1 added a commit that referenced this pull request May 10, 2022
* Added translations for Send Test Mail feature
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 this pull request may close these issues.

3 participants