-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use native language names #250
Conversation
Not entirely opposed, but I'd like to keep some languages denoted as not properly translated (some of them are really not). I couldn't find a way to automate that part. Any ideas? |
What about: ...
auto code = filename.mid(baseName.length(), filename.length() - baseName.length() - 3);
std::vector<std::string> less50Complete { "de_AT", "et", "fi", "pt", "sk", "vi", "zh_CN" };
if (std::find(less50Complete.begin(), less50Complete.end(), code) != less50Complete.end()) {
aBox->addItem(QString{QLatin1String("[less than 50% complete] ") + QLocale(code).nativeLanguageName()}, code);
} else {
aBox->addItem(QLocale(code).nativeLanguageName(), code);
}
...
|
Sounds good. I think having two variables in cmake TRANSLATIONS_FULL and _PARTIAL would make sense, one language being in one of these only and file names generated from the codes. In this way, each language file is represented only once. I think removing the language lookup (directory traversal) could be removed from c++ and done only in CMake (either by a glob, or by specifying all the codes by hand). |
I'm just wondering what's the reason to keep almost not translated languages in release distribution?
It could be somehow useful for translator, but not for normal user. Production ready threshold could be at least 80%. What about excluding such incomplete translations from installation package? Translator can just put |
No specific reason. You're right that they probably don't need to be distributed. Looking into the tx tool, there appears to be a way to only download some translations. So perhaps changing the workflow could be done in this way: rm translations/merkaartor_*.ts and modify the CMake to just glob translations_*.ts, omitting <50% code entirely, keeping the detection as you originally proposed it. |
I've added |
Finally got around to review, I only have one question: is it necessary to have all the languages listed in .tx/config? I'm not honestly sure why they would be there, as my tx client never inserted them there nor did I. |
I've removed them and it seems to work. |
Merged, thanks for the contribution! |
No description provided.