chore: add missing events object to language service

This commit is contained in:
Patryk Osmaczko 2022-07-22 14:23:11 +02:00 committed by osmaczko
parent 239eb4fa8a
commit 8798f785f6
4 changed files with 7 additions and 6 deletions

View File

@ -166,7 +166,7 @@ proc newAppController*(statusFoundation: StatusFoundation): AppController =
)
result.aboutService = about_service.newService(statusFoundation.events, statusFoundation.threadpool)
result.dappPermissionsService = dapp_permissions_service.newService()
result.languageService = language_service.newService()
result.languageService = language_service.newService(statusFoundation.events)
# result.mnemonicService = mnemonic_service.newService()
result.privacyService = privacy_service.newService(statusFoundation.events, result.settingsService,
result.accountsService)

View File

@ -15,10 +15,10 @@ proc locale*(self: Item): string {.inline.} =
self.locale
proc name*(self: Item): string {.inline.} =
self.locale
self.name
proc native*(self: Item): string {.inline.} =
self.locale
self.native
proc flag*(self: Item): string {.inline.} =
self.locale
self.flag

View File

@ -19,7 +19,7 @@ let localeDescriptionTable* = {
"fa": Description(name: "Persian", native: "فارسی", flag: "🇮🇷"),
"fr": Description(name: "French", native: "Français", flag: "🇫🇷"),
"he": Description(name: "Hebrew", native: "עברית'", flag: "🇮🇱"),
"he": Description(name: "Hindi", native: "हिन्दी", flag: "🇮🇳"),
"hi": Description(name: "Hindi", native: "हिन्दी", flag: "🇮🇳"),
"hu": Description(name: "Hungarian", native: "Magyar", flag: "🇭🇺"),
"id": Description(name: "Indonesian", native: "Bahasa Indonesia", flag: "🇮🇩"),
"it": Description(name: "Italian", native: "Italiano", flag: "🇮🇹"),

View File

@ -23,8 +23,9 @@ type
proc delete*(self: Service) =
discard
proc newService*(): Service =
proc newService*(events: EventEmitter): Service =
result = Service()
result.events = events
result.shouldRetranslate = not defined(linux)
proc obtainLocales(dir: string): seq[string] =