Hi

jean-bapti...@holcroft.fr píše v So 10. 10. 2020 v 09:56 +0200:
> hello,
> 
> I'm using translation finder to find translation files in Fedora
> packages ( 22000 files )
> 
> it finds 121000 po files!
> 
> the issue: many don't fall in the easy usecase were file name =
> language code.

The translation-finder gives you a file mask, where you can expect the
language part of the filename.

> i tried to use polib (pyhon) to take the language name from the file
> parameter  but I find 3800 languages, with many errors.
> for French i find many different spelling 
> fr
> FR
> French
> frnech
> francais
> etc.
> 
> or i find totally wrong results...
> 
> how does weblate do?

Weblate uses heuristics based on the language-data[1] database, but it
won't cover all the above cases (it will detect based on the language
name, but not the misspelled or localized language names).

[1]: https://github.com/WeblateOrg/language-data/

> what would be a correct approach?

Persuade people to use sane naming for the files ;-).

-- 
        Michal Čihař | https://cihar.com/ | https://weblate.org/
_______________________________________________
Weblate mailing list -- weblate@lists.cihar.com
To unsubscribe send an email to weblate-le...@lists.cihar.com

Reply via email to