wesnoth / wesnoth

An open source, turn-based strategy game with a high fantasy theme.
https://www.wesnoth.org/
GNU General Public License v2.0
5.51k stars 1.02k forks source link

compile switch for hiding minor translations from language selection menu (GNA #18826) #1278

Closed wesnoth-bugs closed 5 years ago

wesnoth-bugs commented 7 years ago

Original submission by rhonda on 2011-10-20

Translations below a certain mark (like lower than 80% for the main wesnoth po file as first suggestion?) shouldn't appear in the language selection menu. They still should be possible to switch to when editing the preferences file directly so that translators and advanced users still can use those unfinished translations, but endusers rather get confused by languages that in the end turn up only as english because next to nothing is translated yet.

Also, adding the required font information should be one of the first tasks that a translator should do, so that people enabling that language through the preferences file are actually able to see the translations when the font is installed.

If this is not wanted for for everyone, one solution would be to make it a compile switch. I can understand that developers and translators wouldn't want to have to edit the preferences file, but for packages shipped to end users through distributions it is the much safer approach, IMHO.

Thanks in advance for considering,

Rhonda

(Reproduced on any) Release: any Priority: 4 Severity: 2 - Minor

wesnoth-bugs commented 7 years ago

Modified on 2011-10-25

mordante wrote:

I agree the font information should be updated by the translator. If that's not properly done it's a bug and should be filed accordingly.

Regarding the FR I'll think about it, but also like to discuss it a bit more on IRC.

CelticMinstrel commented 7 years ago

Whether it's a compile switch or not (could also be an advanced or hidden preference), this needs to become the default behaviour for the Steam release.

CelticMinstrel commented 6 years ago

Since @singalen has gotten started on this to some extent, should it maybe be reassigned to him?

singalen commented 6 years ago

I’m ok with it.

CelticMinstrel commented 6 years ago

Ah, apparently you're not a member of the project yet so I can't actually mark it as being assigned to you.

singalen commented 6 years ago

Here's a PR: #2552 that computes the translated% of all pos and writes it to the language There are 2 missing parts:

Another question. Currently, the script calculates the translated % over all the po files. Clearly, some of them are more important that the others. Should it only use some core files (for, example, wesnoth, wesnoth-lib, wesnoth-multiplayer, wesnoth-tutorial, wesnoth-units), or exclude some like wesnoth-manpages?

CelticMinstrel commented 6 years ago

I think all the non-campaign textdomains would be a good start. Man-pages probably isn't a priority though.

singalen commented 6 years ago

Phew, it turned out much larger than it seemed. As always.

Updated the pull request. Now this one only needs some guidance - how to integrate it into po-update.

The command to be run should be like: po_stat.py --update-cfg --textdomains=wesnoth,wesnoth-editor,wesnoth-help,wesnoth-lib,wesnoth-manual,wesnoth-multiplayer,wesnoth-tutorial,wesnoth-units

singalen commented 6 years ago

Now another questions. Integration into pot-update (9ead2235875fb44cdb4cc6950f55ee26c8d85268) requires Python in PATH on translator's system, otherwise pot-update will fail. How do we handle it? Update FindTranslatorTools.cmake? Or make po_stat optional? Just ignore it, as non-Windows systems always have at least Python 2? @CelticMinstrel

loonycyborg commented 6 years ago

Currently pot-update is only run on POSIX systems which pretty much all currently have python installed. This applies to MacOS too.

CelticMinstrel commented 6 years ago

I'd say just ignore it. Non-Windows systems will basically already have Python installed, and I'd argue that most Windows systems used for development will also have it installed (though possibly not in PATH, I guess).

singalen commented 6 years ago

Then the PR is ready. I tested pot-update on Mac with scons and CMake.

Vultraz commented 6 years ago

2552 Added a method to do this. All it needs now is a command-line switch to disable that behavior.

sevu commented 6 years ago

Can this be closed or is there sth. else remaining?

singalen commented 6 years ago

I didn’t implement a commandline switch to override the percentage, is it necessary once again?

Vultraz commented 6 years ago

Didn’t @CelticMinstrel add that?

CelticMinstrel commented 6 years ago

I did implement it. I'm not sure whether this is still open simply because I forgot to close it, or if it's still open because I forgot to forward-port.