Skip to content

Commit 3694c19

Browse files
Copilotpetrpavlik
andauthored
Fix duplicate line and typo in Tolgee.swift (#4)
* Initial plan * Fix duplicate line and typo in variable name Co-authored-by: petrpavlik <1067678+petrpavlik@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: petrpavlik <1067678+petrpavlik@users.noreply.github.com>
1 parent 30da25a commit 3694c19

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/Tolgee/Tolgee.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public final class Tolgee {
184184
}
185185

186186
if customLocale != .current {
187-
guard let customLocalLanguage = languages?.localLaunguage else {
187+
guard let customLocalLanguage = languages?.localLanguage else {
188188
logger.error(
189189
"The provided locale \(customLocale.identifier) is not supported by the app localizations"
190190
)
@@ -427,7 +427,6 @@ public final class Tolgee {
427427
lastFetchDate = nil
428428
translations.removeAll()
429429
cdnEtags.removeAll()
430-
cdnEtags.removeAll()
431430
try cache.clearAll()
432431
logger.debug("Successfully cleared all cached translations and ETag data")
433432
}
@@ -486,7 +485,7 @@ public final class Tolgee {
486485
self.customLocalLanguage = nil
487486
} else {
488487
self.customLocale = locale
489-
self.customLocalLanguage = languages.localLaunguage
488+
self.customLocalLanguage = languages.localLanguage
490489
}
491490
didUpdateLocale = true
492491
}
@@ -603,7 +602,7 @@ public final class Tolgee {
603602
}
604603

605604
private func resolveLanguages(from locale: Locale)
606-
throws -> (localLaunguage: String, cdnLanguage: String)
605+
throws -> (localLanguage: String, cdnLanguage: String)
607606
{
608607
if let localLanguage = resolveLanguage(for: locale, in: bundleForLanguageDetection),
609608
doesLocaleMatchLanguage(locale, language: localLanguage)

0 commit comments

Comments
 (0)