Fix logic mistake from the refactor in f8bd32e

This commit is contained in:
Gunter Labes 2024-02-21 14:38:34 +01:00 committed by GitHub
parent b39d5d53d7
commit 15a769d8b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,7 @@ std::string format_addon_feedback_url(const std::string& format, const config& p
void support_translation(config& addon, const std::string& locale_id)
{
config* locale = addon.find_child("translation", "language", locale_id).ptr();
if(locale) {
if(!locale) {
locale = &addon.add_child("translation");
(*locale)["language"] = locale_id;
}