12 10 4
works in all locales. :-)
101–110 of 257 posts
12 10 4
works in all locales. :-)
Earlier quoted context omitted.
This looks quite nice and powerful and indeed an elegant way of solving the problem with multiple plural forms in a string. The only concern I have with that syntax is that it's yet another DSL, or markup language and translators need to know it, or could get it wrong. Granted, a program for helping translators might do automatic linting (much as Qt's Linguist already warns if you omit placeholders from the translate…
Well, if we're going to introduce that level of complexity into a DSL, why not go full Turing-Complete and write it in code? (case (length folks) (0 "No one went.") (1 ((elt 0 folks) " user went.")) (2 ((elt 0 folks) " and " (elt 1 folks) " went.")) (otherwise ((elt 0 folks) " and " (length folks) " others went."))) You can wrap that in a lambda that concatenates resulting strings and voilà, you have "smart" string t…
Earlier quoted context omitted.
I think the poor understanding of English was part of the problem. We didn't understand , we just knew that you found what you need when you click "Insert" or whatever. To us "insert" didn't mean insert, it meant "That menu where you find an Image to put in your document". In our mind the English word and its native translation have semantically different meanings. I discover this problem a lot now that I'm older. I…
> In our mind the English word and its native translation have semantically different meanings. Because they quite often have (I'd wager that more often than not). To use your example, English "Insert" cuts through a different part of concept-space than Polish "Wstaw" (which is what usually ends up as a menu label). It's a fine translation up until you ask to insert a DVD - now you should say "Wsuń" or "Włóż". And I…
The problem arises when your girlfriend (or friend or whatever) visits you in the homeland and you suddenly find yourself struggling to find words because many of the things at home don't have English names. It becomes even worse when you have to act as translator between them and your family who doesn't speak English or doesn't speak it as well.
Yes, I had a lot of fun over the holidays ...
Even something as simple as "Did your mum like me?" becomes difficult to translate because your mum said X and X doesn't quite translate into English with all the connotations preserved.
Slightly OT, mi favourite localization error was in Ubuntu when they had that nice netbook interface (that later would become Unity). The network icon label was "Rojo" in the Spanish localization, that is the word for "red" color. What? Well, if you translate "Net" to Spanish you get "Red"; and if you translate that again (by mistake), you get "Rojo". There you are :)
That's an error only an amateur translator would make. Guess who makes free software translations... A professional translator makes sure to check the context of the translation, it doesn't go blindly translating sentences and words without context.
1. professional translators are human and make mistakes
2. context may not be available for third-party translators working on e.g. unreleased software strings (see currently top comment by "eloisant")
I wonder if it isn't better to generate the messages as an AST, and have a language generator, the back-end of a compiler really, that generates strings for each language. I'm sure there will be less edge cases that way. /edit: wow, downvotes.
The representation makes no assumption of SVO order, the grammatical category of numbers, and what cases and tenses are available.
(OPRESENT ((OSUBJECT (OPRONOUN (3, 0))) ((OVERB, "like") OMUL (2, (OCAST (OATTR (OCOLOR "brown")), (ONOUN (OANIMAL, "cat")))))))
I'm sure someone smart will tell me what assumption I made that's invalid in some language I do not know, but this already is better, and simpler, and more correct than a lot of text-mapping based internalizations I've seen.And I will be able to correct my S-expr to get rid of more assumptions, and I will just make it longer perhaps, but I won't need to write all the convoluted code prevalent in the article.
Also, with AST-based representation you can add whatever context you need. For example, were I to have used "pig" instead of "cat", this would have already worked fine, since we have (OANIMAL, "pig") and not (OPERSON, "pig"). This is trivial, but you can add whatever amount of context required.
Earlier quoted context omitted.
That's an error only an amateur translator would make. Guess who makes free software translations... A professional translator makes sure to check the context of the translation, it doesn't go blindly translating sentences and words without context.
> A professional translator makes sure to check the context of the translation, it doesn't go blindly translating sentences and words without context. From my experience with both software and movies, that's exactly what a professional, paid translator does (or is forced to). Amateurs at least watch the movie/run the software before translating things, which is something I definitely cannot say about "professionals"…
Not to mention the difficulty in getting them to use Virtaal or PoEdit properly.
This just shows the beauty of the Unix way of doing things. Simply: 12 10 4 works in all locales. :-)
__________
¹ I tend to set my minus sign to U+2212 to catch errors in code where we just use ToString() instead of ToString(CultureInfo.InvariantCulture). Almost as much fun as putting a Unicode character into your user name that isn't representable in the current legacy codepage on Windows.
² ۱۲ ۱۰ ۴ probably won't work as input to the application trying to parse that line ;)
Earlier quoted context omitted.
To be fair it was a beta of the "Ubuntu Netbook Remix" and that bug was shortly fixed. I took some screenshots because I really liked the interface, but none of them show the bug because I usually stick to en_GB and the problem was spotted in my wife's netbook (she's Spanish teacher and likes to have the OS interface in Spanish to amuse the kids).
Am I the only one that gets confused on what the menus and other things on a non English computer or device actually mean when translated. This coming from someone doesn't speak English as their first language. I speak Romanian, Hungarian and English perfectly but my devices are always in English since it would be harder to figure out what they mean otherwise unless you have the structure memorized already.
Earlier quoted context omitted.
Well, if we're going to introduce that level of complexity into a DSL, why not go full Turing-Complete and write it in code? (case (length folks) (0 "No one went.") (1 ((elt 0 folks) " user went.")) (2 ((elt 0 folks) " and " (elt 1 folks) " went.")) (otherwise ((elt 0 folks) " and " (length folks) " others went."))) You can wrap that in a lambda that concatenates resulting strings and voilà, you have "smart" string t…
And then you have the exact same problem as if you'd write that logic in your source code. Just with half a dozen layers of abstraction, a more cumbersome way of displaying strings in your application and another programming language on top. I'd say that's not a net positive.
Edit: Disregard, turns out things have improved > The %g slots are in an order reverse to what they are in English. You wonder how you'll get gettext to handle that. I learned C/++ after C# and this is one thing that really got to me. String interpolation in C++ is extremely primitive, which would be fine only if more recent iterations of stdlib had something that wasn't so completely incompetent. For those who don't…
The article is outdated. Gettext does have reordering syntax. https://www.gnu.org/software/gettext/manual/html_node/c_002d...