This commit is contained in:
Vaxry 2025-11-08 23:03:14 +00:00
parent c012282933
commit a5b1113633
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -61,7 +61,7 @@ std::string CI18nEngine::localizeEntry(const std::string& locale, uint64_t key,
auto stem = locale.substr(0, locale.find('_') + 1); auto stem = locale.substr(0, locale.find('_') + 1);
for (const auto& [k, v] : m_impl->entries) { for (const auto& [k, v] : m_impl->entries) {
if (k.starts_with(stem)) { if (k.starts_with(stem) || k == stem) {
if (m_impl->entries.contains(k) && m_impl->entries[k].size() > key) if (m_impl->entries.contains(k) && m_impl->entries[k].size() > key)
entry = &m_impl->entries[k][key]; entry = &m_impl->entries[k][key];