RL10N / rl10n.github.io

Website for RL10N
http://rl10n.github.io/
0 stars 0 forks source link

Ideas on how to make translation tasks easier #4

Open lukaszdaniel opened 8 years ago

lukaszdaniel commented 8 years ago

Hi there,

I got your message where you asked for opinions on what could be done in order to make translation tasks easier. I'd like to share my opinions concerning translatable messages based on my experience with R and its recommended packages. What made it difficult for me to translate R* to polish language was as follows:

  1. Chopped messages like warning("there are", number, "elements"). In english language its not a big deal, but other languages may have different form depending on what the context is. So: Do not chop messages.
  2. Unclear messages like warning("didn't converge"). Again for languages other than english it may be difficult to keep one (global) form. So: (using my example) Always tell WHAT didn't converge.
  3. Semi-plural forms like warning("there are %d element(s)"). English has 1 plural form, some other languages have more than 1. So: Use ngettext(number, "single", "plural") even if "single" form will never occur. Or more general, use ngettext whenever you count something.
  4. More than one form of the same sentence like "there is 1 element" vs "there is one element", "not an 'matrix' object " vs "argument '%s' is not an object of class '%s'", and so on. So: Standardize messages where possible.

To sum up, from my point of view, it all comes down to the non-technical problem of localization-awareness among developers. Can't recall technical ones - sorry.

lukaszdaniel commented 8 years ago

After some thoughts I have few ideas. Give warning, when during creation of pot file you notice chopped messages, or '(s)' monsters (like: "element(s)"). Suggest ngettext, when you notice %d in a message (usually it is used for counting).

leeper commented 8 years ago

Great suggestions, thanks! Sounds like we could also make some documentation showing examples of good and bad message constructions, in addition to creating technical checks. On Mar 24, 2016 3:00 PM, "Lukasz Daniel" notifications@github.com wrote:

After some thoughts I have few ideas. Give warning, when during creation of pot file you notice chopped messages, or '(s)' monsters (like: "element(s)"). Suggest ngettext, when you notice %d in a message (usually it used for counting).

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/RL10N/rl10n.github.io/issues/4#issuecomment-200874536