Live data from Hacker News

A Localization Horror Story: It Could Happen to You

search.cpan.org

191–200 of 257 posts

Re: A Localization Horror Story: It Could Happen to You

#191
post #29

Earlier quoted context omitted.

Indeed, this is a solved problem. Use ngettext, see its page for all different language variations (even the Slovenian four different forms) https://www.gnu.org/software/gettext/manual/html_node/Plural...

How does ngettext handle "Your query matched %g files in %g directories"?

There's always an exception. You have two choices.

First: you might split it into three strings and trust the translator to handle it.

For example, you might pick:

  "Your query matched %(filecount)s in %(directorycount)s"?
  "%g files"
  "%g directories"
with appropriate plurals for the %g ones.

Another translator might pick:

  "Your query %(filecount)s %(directorycount)s"?
  "matched %g files"
  "in %g directories"
to get the flexibility they need.

You only hit a problem there when you get one word that is requires declination dependent on both numbers in a way that you can't fit to be contiguous with the numbers. It's not foolproof, but it's certainly enough flexibility if you're willing to re-word things slightly.

Alternatively, and this is my favoured way, you can have the result of a plural lookup be a second msgid, for example:

  msgid "files_found_by_n_directories"
  msgstr[0] "files_found_directory_0"
  msgstr[1] "files_found_directory_1"
  msgstr[2] "files_found_directory_2"
  
  msgid "files_found_directory_0"
  msgstr[0] "Your query didn't match any files"
  msgstr[1] "Your query matched a file in no directories"
  msgstr[2] "Your query matched %(file)g files in no directories"
  
  msgid "files_found_directory_1"
  msgstr[0] "Your query didn't match any files in a directory"
  msgstr[1] "Your query matched %(file)g file in a directory"
  msgstr[2] "Your query matched %(file)g files in a directory"
  
  msgid "files_found_directory_2"
  msgstr[0] "Your query didn't match any files in %(directories)g directories"
  msgstr[1] "Your query matched %(file)g file in %(directories)g directories"
  msgstr[2] "Your query matched %(file)g files in %(directories)g directories"

Re: A Localization Horror Story: It Could Happen to You

#192
post #133

Earlier quoted context omitted.

It makes sense if not all of your target demographic, or at least a large part, cannot read English on the level neccesary to use your tool. However, for a lot of modern tools that isn't the case. Often a translated tool is an order of magnitude less usable because of broken translations and inability to Google things. It's also infurating that lots of tools look at your Windows location when deciding your language.…

That's if you're lucky! Google does far worse, and picks a language based on their often broken geo IP system. It's not even fixable. When viewing alt text for Google doodles, for instance, I get "localized" text even if the rest if the UI is in English. Google Play also has jacked up section titles from time to time. Netflix search box is the same way. This is in addition to the discriminatory practice of often not…

Don't forget monolingual managers that just don't care though. I've done so many last-minute string translations... "Oh shit, we forgot French, this was supposed to launch last week, you have 1 hour." And then insert the types of cases from the original article here where you need grammatical logic in a fixed string. Ugh.

Re: A Localization Horror Story: It Could Happen to You

#193
post #181
post #141

Earlier quoted context omitted.

That sounds like a great technical approach, although it can't necessarily remove the problem of idiomaticity that the article mentions (with the example of "I didn't search any directories"). Probably better examples are possible, in any case where the most idiomatic way to express something isn't a literal translation of that thing from other languages. Maybe like English "I don't care" Portuguese "tanto faz" (lite…

BTW, egal doesn't mean equal in German (though it's borrowed from French égal, which does). It means "irrelevant", "all the same", "unimportant".

Good point, sorry for the mistake.

Re: A Localization Horror Story: It Could Happen to You

#194
post #125
post #24

Earlier quoted context omitted.

Cool example, but I think "ne" is the "correct" way to romanize ね.

Could also be from German, although this would also be written ne instead of neh. People from the northern part of Germany use this in pretty much the same way it is used in Japanese (at least according to what I know with my limited knowledge of Japanese) I always thought of this as a strange quirk that the same language construct can evolve in two unrelated languages. It's just like parallel evolution in biology.

It's funny that "gel", which you hear pretty often in Austria (and probably South Germany), means the same as well.

It's approximately the same as "nicht wahr?", or "oder?", which can't really be translated, but suggest wanting some kind of verification for what was said.

Re: A Localization Horror Story: It Could Happen to You

#195

It made me remember the Norwegian customer I had. I needed to write Norwegian localization strings in a YAML file which did not work for some reason. After 4 hours of debugging, the problem was; In YAML, the "no:" string (for "norwegian") defined in a YAML file was parsed as a boolean, and this makes the application broke..

Yeah, I've run into that, also. Really annoying. I had to quote all of the "no": strings. Looked ugly, but what can you do?

Re: A Localization Horror Story: It Could Happen to You

#196

When I was in Japan I did proof reading for a Japanese feature phone. A major Japanese brand, actually. That was really comical. There was an Australian guy for English, an German guy, an Italian lady, and me for French. What they did prior to the meeting is: * translate from Japanese to English by Japanese people with a poor English level (maybe the software engineers actually) * translate from weird English to othe…

@eloisant: I work in automotive where I deal with translations for automotive clusters for one of the largest auto makers. Automotive companies are going to what are called reconfigurables which is basically an instrument cluster with no mechanical gauges; just a screen with gauges rendered by 3D engine. Center stacks too. I kid you not, the way we translate is to use Google translate as a first pass and then the scr…

I worked for a place that used German as the "placeholder text", to avoid the problem of text longer than the allotted space. German is supposedly about 1.5 times as long as English, so if you can fit the German version, you won't have any problems with other translations being longer than the space.

Re: A Localization Horror Story: It Could Happen to You

#197
post #125
post #24

Earlier quoted context omitted.

Cool example, but I think "ne" is the "correct" way to romanize ね.

Could also be from German, although this would also be written ne instead of neh. People from the northern part of Germany use this in pretty much the same way it is used in Japanese (at least according to what I know with my limited knowledge of Japanese) I always thought of this as a strange quirk that the same language construct can evolve in two unrelated languages. It's just like parallel evolution in biology.

Since I'm German, this is probably at least the reason why I found it so easy to accept this construct, when I stumbled upon it in Ender's Game. It just felt natural, so my brain decided to use it in English, too. :)

Re: A Localization Horror Story: It Could Happen to You

#198
post #181
post #141

Earlier quoted context omitted.

That sounds like a great technical approach, although it can't necessarily remove the problem of idiomaticity that the article mentions (with the example of "I didn't search any directories"). Probably better examples are possible, in any case where the most idiomatic way to express something isn't a literal translation of that thing from other languages. Maybe like English "I don't care" Portuguese "tanto faz" (lite…

BTW, egal doesn't mean equal in German (though it's borrowed from French égal, which does). It means "irrelevant", "all the same", "unimportant".

That's true.

"[das] ist mir gleich" would literally be '[it] is equal for me'). It means the same ("don't care") and is perfectly idiomatic German as well.

Re: A Localization Horror Story: It Could Happen to You

#199

When I was in Japan I did proof reading for a Japanese feature phone. A major Japanese brand, actually. That was really comical. There was an Australian guy for English, an German guy, an Italian lady, and me for French. What they did prior to the meeting is: * translate from Japanese to English by Japanese people with a poor English level (maybe the software engineers actually) * translate from weird English to othe…

> and me for French > The French guy actually translated "Garbage day" to something like "Shitty day" So you translated it to "jour de merde"?

That's the other way around, the guy who did the translation without context wrote "jour de merde", and I saved them from releasing that in their phone calendar app during my one-day job paid in cash.

Re: A Localization Horror Story: It Could Happen to You

#200
post #111

Earlier quoted context omitted.

Or the classic: http://news.bbc.co.uk/1/hi/7702913.stm

My favorite is still this one: http://www.theguardian.com/world/shortcuts/2012/feb/08/diese...

That's a head-smacker. Some guy somewhere must have actually painted that on the trailer - does that guy not think "Hey, this doesn't really make sense. Are you sure they didn't want somebody to translate this to Arabic?"

Or maybe he did and his boss told him to shut up and do as he's told. Or he thought - "Screw this, I wanna go home on time. I'm not gonna bother to find an Arabic translator now. I'll just paint exactly what it says, and they can't get me in much trouble for that."

Post reply on HN