Skip to content

Commit 383cf96

Browse files
committed
style: fixes
1 parent d48facf commit 383cf96

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/index.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@ const loaded: LanguageInterface[] = []
2727
*/
2828
const activeMessages: object = reactive({})
2929

30-
/**
31-
* Sets the language messages to the activeMessages.
32-
*/
33-
function setLanguage({ lang, messages }: LanguageInterface): string {
34-
document.querySelector('html').setAttribute('lang', lang)
35-
36-
for (const [key, value] of Object.entries(messages)) {
37-
activeMessages[key] = value
38-
}
39-
40-
for (const [key] of Object.entries(activeMessages)) {
41-
if (!messages[key]) {
42-
activeMessages[key] = null
43-
}
44-
}
45-
46-
return lang
47-
}
48-
4930
/**
5031
* Loads the language file.
5132
*/
@@ -90,6 +71,25 @@ export function trans_choice(key: string, number: number, replacements: Replacem
9071
return makeReplacements(choose(message, number, options.lang), replacements)
9172
}
9273

74+
/**
75+
* Sets the language messages to the activeMessages.
76+
*/
77+
function setLanguage({ lang, messages }: LanguageInterface): string {
78+
document.querySelector('html').setAttribute('lang', lang)
79+
80+
for (const [key, value] of Object.entries(messages)) {
81+
activeMessages[key] = value
82+
}
83+
84+
for (const [key] of Object.entries(activeMessages)) {
85+
if (!messages[key]) {
86+
activeMessages[key] = null
87+
}
88+
}
89+
90+
return lang
91+
}
92+
9393
/**
9494
* Make the place-holder replacements on a line.
9595
*/

0 commit comments

Comments
 (0)