MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / updateLanguage

Method updateLanguage

launcher/translations/TranslationsModel.cpp:663–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663void TranslationsModel::updateLanguage(QString key)
664{
665 if(key == defaultLangCode)
666 {
667 qWarning() << "Cannot update builtin language" << key;
668 return;
669 }
670 auto found = findLanguage(key);
671 if(found == decltype(found){})
672 {
673 qWarning() << "Cannot update invalid language" << key;
674 return;
675 }
676 if(!found->updated)
677 {
678 downloadTranslation(key);
679 }
680}
681
682void TranslationsModel::downloadTranslation(QString key)
683{

Callers 1

languageRowChangedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected