Git Product home page Git Product logo

Comments (13)

TrueBrain avatar TrueBrain commented on June 27, 2024

You seem to be jumping to a few conclusions. But from what I read, mostly you noticed that Basque doesn't have the right plural system attached to it. So I think I can summarize your post to: please change the plural-system attached to Basque? To that I can ask:

Please supply what plural-system is used by Basque. A full list of what we support can be found here:

https://github.com/OpenTTD/eints/blob/main/webtranslate/newgrf/language_info.py#L38

If the one used by Basque is not on there, please supply references to how it works.

At last, I would like to recommend using Gettext i18n system

OpenTTD supports many complex forms of translations, far beyond what gettext offers. Besides the complex plural-system (over 15 systems are supported so far), we also have extensive support for taking plurals into account for partial words, support genders, cases (like acc, abl, dat for Latin), and translators have the freedom to combine sentences in a way that makes sense in their native language (including swapping words, variables, etc). We offer a lot of freedom. Please see https://translator.openttd.org/static/docs/strings.html#plural-form and further for a complete overview, and any of the relatable languages that have translations.

As you see, not every language work the same way, and that's need to be taken into account when doing i18n.

Most of your post is not something I recognize, as we are well aware of the different systems different languages use (which shows by the fact we have OpenTTD translated to 66 different languages). The tone is also rather condescending, but I guess that the actual tone is just lost in translation (hihi, the irony) ;)

So... is there any way a translator could load their new LANG file into the game to see their translation?

Every night OpenTTD creates a new "nightly" which contains the latest version of all translations. This is the best way to see how your translation looks. Given the complexity of our game, this is the best we currently have to offer. We are open for Pull Requests to extend that system however, just nobody has taken on that job yet.

from openttd.

TrueBrain avatar TrueBrain commented on June 27, 2024

We looked into this a bit more, and from what I can tell, we do support the plural cases you ask for, within the current plural system. It just seems that the translator of 10 years ago made choices that are not in line with your expectations. As you are now the sole translator for Basque, something you can fix!

For example, STR_CARGO_PLURAL_PASSENGERS is translated (correctly I take from your post) with Bidaiariak.
As is STR_CARGO_SINGULAR_PASSENGER. But STR_QUANTITY_PASSENGERS is translated with {COMMA}{NBSP}bidaiari{P "" ak}, and from what I read from you, that should be {COMMA}{NBSP}bidaiari instead? (similar with STR_PASSENGERS).

{COMMA} here is the amount of passengers, and {P "" ak} means: if one passenger, don't add anything, and if more, add ak. Which seems to be exactly what you run into, and of which you say it is wrong. The last translator however deliberately put it there (seemly by mistake or not understanding the system). It is, however, the only place {P} is used when looking at cargo. Coal for example is just {WEIGHT_LONG} ikatz. So maybe that is just done by error.

Also it appears Basque has cases, but the original translators never asked for any. Also maybe something that helps you in the translation?

Anyway, we are very open to add additional support for languages, as we like our game to be as crisps as it can be in other languages (within reason, ofc :P). But we have the issue that you have to learn our system, and we have to learn your language. So we have to find a bit of middleground to talk from. Easiest way for that is to join us on Discord, but also feel free to give examples here where you can't figure out how to make the translation correct, and we can look with you how that fits in our system.

Edit: similar, your example of "tons" is translated with {DECIMAL}{NBSP}tona{P "" k}, which seems to be wrong too, if I understand you correctly.
Edit 2: I also looked at your livestock example, but the English string is: {COMMA}{NBSP}item{P "" s} of livestock. Which is exactly what you suggest. And we don't measure livestock in tonnes, but in items. Which is translated with {COMMA}{NBSP}abere buru. So I am a bit confused about that part of your post. We already offer the combination as a whole string (as many of the other 66 languages also need that context to do a proper translation). Can you elaborate on what I am missing here?

from openttd.

Porrumentzio avatar Porrumentzio commented on June 27, 2024

First of all, I want to apologize, since I did actually jump to some wrong conclusions. I am sorry if the tone came across as condescending. I was surely enthusiastic, but I didn't mean to be condescending.

That said, I just have a question to improve Basque and maybe its i18n: how can I translate and search for specific strings? Either on the web platform or locally.

If I had anything to say about i18n, I will join Discord.

To end up, my example of the livestock was just fictional, not a real one. Sorry for the confusion.

So I ask again about how could I search specific strings, and I'll try to make this little mess a bit more constructive.

from openttd.

TrueBrain avatar TrueBrain commented on June 27, 2024

First of all, I want to apologize, since I did actually jump to some wrong conclusions. I am sorry if the tone came across as condescending. I was surely enthusiastic, but I didn't mean to be condescending.

No worries :)

Currently the easiest way to search is by looking at the source file (https://github.com/OpenTTD/OpenTTD/blob/master/src/lang/basque.txt). Or on the main page of a language with CTRL+F.

As this of course is a suboptimal solution, we so happen to be in active development of a new version of our translator tool, which will allow for searching from the interface. But that is weeks away, as time is hard to come by :)

from openttd.

Porrumentzio avatar Porrumentzio commented on June 27, 2024

Great! I just started translating wrong strings and, for that, I found out that if I enter the string name into the web translator slug, I can actually search and edit specific strings!

While correcting previous translation, I found some strings in which I need help, for example, STR_NEWS_COMPANY_MERGER_DESCRIPTION
In this string, there are two variables called {STRING}. How does the program decide which one is the cargo and which on the competitor? By the order? If it's that way, it would be helpful if those two variables are marked differently so the translators can place them in any order.

from openttd.

LordAro avatar LordAro commented on June 27, 2024

This bit is in the manual: https://translator.openttd.org/static/docs/strings.html#string-commands

from openttd.

TrueBrain avatar TrueBrain commented on June 27, 2024

By the order?

Yes.

If it's that way, it would be helpful if those two variables are marked differently so the translators can place them in any order.

As @LordAro mentions, you already can, by using {STRING:0} for the first, and {STRING:1} for the second.

In the new webtranslator version we are working on, this is made more explicit. That is to say, the English string already shows {STRING:0} and {STRING:1}, so it is more clear to translators that you can just swap them around in translations. This is in the current system a bit hidden, but once you know, you know :) (and not many translators know, so I can understand your question here :D )

from openttd.

Porrumentzio avatar Porrumentzio commented on June 27, 2024

Thanks both. I'll use the number afixes for that. And as you are working on making this thing more clear, what do you think about giving different names to each parameter, so the translator does not only know the order, but also the content of each string explicitly, without needing to deduce what could it be or checking it in the game?

For example, in the given example it could be this way:
[...]{CARGO_STR} has been sold to {PLAYER_STR} for {CURRENCY_LONG}!

from openttd.

TrueBrain avatar TrueBrain commented on June 27, 2024

This would have been a good idea 20 years ago. And it has been talked about on and off over the years. But doing it now would be a massive undertaking. Almost 5000 strings need to be evaluated, and then synchronized with 65 translations. I do not think anyone would be against such change, if done properly. But I also think that most people are like: meh, it is clear enough in the context of the English string, so the added value is not all that high for the amount of effort it would take.

But if we would do it, we do need to think about how. For example, CARGO_STR might not be ideal; as internally we only care it is a {STRING}. But maybe some other way, like {STRING:cargo}, instead of {STRING:0}. I dunno. But it requires a bit of designing and testing with other developers / translators. And then a lot of effort to make it happen.

So if you are up for it, create a design, test it with us, and go for it! I know it would make several translators happy :)

from openttd.

glx22 avatar glx22 commented on June 27, 2024

In the example, both {RAW_STRING} are actually the result of {COMPANY}, but preparsed because at the time the news is displayed one of them is gone.

from openttd.

Porrumentzio avatar Porrumentzio commented on June 27, 2024

I see that's a very big work. I'm not for it by now.

About the translations, I updated and fixed locally a lot of errors in the Basque translation, but couldn't find the way to update the file via Web Translator, so I'm pasting it here hoping someone will be able to incorporate it
basque.txt

from openttd.

TrueBrain avatar TrueBrain commented on June 27, 2024

Sadly, that is not possible or practical. You really have to insert the translation in our webtranslator, as it also does validation and hints towards problems while doing so. We cannot judge any validation errors thrown at us, as such, it really has to be done by someone understanding the native language.

from openttd.

Porrumentzio avatar Porrumentzio commented on June 27, 2024

Oh, and isn't there any way to load the file into the WebTranslator so it do validation and give hints?

from openttd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.