-
-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
Awesome 👌 I'll take some time to read about vue-i18n before rewiewing |
added shop i18n. its mostly translated by google translator with some adjustments i made. we should get some people to start checking the translations and maybe bring some more in, blue category weapon types are not translated yet. also there is a bug with these 1H and 2H since they are for some weapons duplicated. |
". It adds persistence to the multiplayer. You start as a peasant and you'll develop your unique character with different stats and items.", | ||
homeSignIn: 'Sign in through Steam', | ||
homeFAQTitle: 'F.A.Q', | ||
homeQuestion1: 'Is the mod available?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case you can use an array
homeFAQList: [
[
'Is the mod available?',
'The mod is currently in beta..'
],
]
or
homeFAQList: [
{
answer: 'Is the mod available?',
question: 'The mod is currently in beta..'
},
]
itemPropertiesHandling: 'Handling', | ||
|
||
// Items | ||
crpg_female_head_wrap: 'Female Headwrap', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, we should't create a mapping id <=> $t('name')
.
It is necessary to implement the response from the REST API in the selected (current) language.
Commonly used req/res header Accept-Language
@verdie-g
Front-end should't know about the items.
@@ -24,7 +24,7 @@ | |||
</figure> | |||
</div> | |||
<div class="card-content content"> | |||
<h4>{{ item.name }}</h4> | |||
<h4>{{ $t(item.id) }}</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
], | ||
"Providers": { | ||
"Steam": { "ApplicationKey": "FE0A32B959ED3C6561E1F3F3BE68F75D" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discarding pls, just add to git stash
@@ -6,5 +6,6 @@ | |||
"tabWidth": 2, | |||
"htmlWhitespaceSensitivity": "ignore", | |||
"arrowParens": "avoid", | |||
"trailingComma": "es5" | |||
"trailingComma": "es5", | |||
"endOfLine": "auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if you need to change the default value (lf
)
@@ -17,7 +18,7 @@ async function trySend(method: string, path: string, body?: any): Promise<Result | |||
}); | |||
|
|||
if (response.status === 401) { | |||
notify('Session expired', NotificationType.Warning); | |||
notify(i18n.t('sessionExpired').toString(), NotificationType.Warning); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to cheat a little so as not to write .toString()
everywhere
reference
@@ -9,7 +9,11 @@ import '@fortawesome/fontawesome-free/css/all.css'; | |||
import '@fortawesome/fontawesome-free/css/fontawesome.css'; | |||
import 'leaflet/dist/leaflet.css'; | |||
import '@/assets/scss/index.scss'; | |||
import VueI18n from 'vue-i18n'; | |||
import en from '@/resources/i18n/i18n_en'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use lazy loading
router, | ||
store, | ||
render: h => h(App), | ||
}).$mount('#app'); | ||
|
||
export { i18n }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entry point to the application should't return anything.
It is better to create a boot/i18n.ts
or setup/i18n.ts
ref
@@ -0,0 +1,6 @@ | |||
export function mapFilter<K extends keyof any, T>(m: Map<K, T>, f: (value: K) => boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use a clean function
and return the new Map
ref
@@ -0,0 +1,1363 @@ | |||
/* eslint-disable @typescript-eslint/naming-convention */ | |||
const en = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe YAML )
c006ecc
to
16b9370
Compare
Let's do i18n in the new UI instead. |
shop items are not translated