feat(Settings): disable force relays by default (#2104)

* feat(ForceRelayCxnCmd): move label and desc to translations
* fix(TranslationService): Force updating languages wouldn't regenerate cache
This commit is contained in:
Andreas Maerten
2023-09-09 00:04:08 +02:00
committed by GitHub
parent a3532a6436
commit 3385a0d7fb
5 changed files with 16 additions and 6 deletions

View File

@ -114,6 +114,12 @@ namespace big
}
}
void translation_service::update_n_reload_language_packs()
{
update_language_packs();
load_translations();
}
void translation_service::load_translations()
{
m_translations.clear();

View File

@ -28,7 +28,12 @@ namespace big
std::map<std::string, translation_entry>& available_translations();
const std::string& current_language_pack();
void select_language_pack(const std::string& pack_id);
void update_language_packs();
/**
* @brief Updates the language packs and reloads the language cache
*
*/
void update_n_reload_language_packs();
private:
void load_translations();
@ -36,6 +41,7 @@ namespace big
nlohmann::json load_translation(const std::string_view pack_id);
bool download_language_pack(const std::string_view pack_id);
void update_language_packs();
/**
* @brief Downloads the remote index to compare with our local index