Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
bd77f3a1
Commit
bd77f3a1
authored
Apr 6, 2022
by
HJ
Browse files
Options
Downloads
Patches
Plain Diff
fix i18n for good??
parent
78817e37
No related branches found
No related tags found
2 merge requests
!1711
Update stable - 2.5.0 release
,
!1504
Makes develop usable on stock PleromaBE
Pipeline
#39602
failed
Apr 6, 2022
Stage: lint
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/webpack.base.conf.js
+9
-8
9 additions, 8 deletions
build/webpack.base.conf.js
src/i18n/messages.js
+3
-3
3 additions, 3 deletions
src/i18n/messages.js
with
12 additions
and
11 deletions
build/webpack.base.conf.js
+
9
−
8
View file @
bd77f3a1
...
...
@@ -59,6 +59,15 @@ module.exports = {
}
}
},
{
enforce
:
'
post
'
,
test
:
/
\.(
json5
?
|ya
?
ml
)
$/
,
// target json, json5, yaml and yml files
type
:
'
javascript/auto
'
,
loader
:
'
@intlify/vue-i18n-loader
'
,
include
:
[
// Use `Rule.include` to specify the files of locale messages to be pre-compiled
path
.
resolve
(
__dirname
,
'
../src/i18n
'
)
]
},
{
test
:
/
\.
vue$/
,
loader
:
'
vue-loader
'
,
...
...
@@ -99,14 +108,6 @@ module.exports = {
}
}
},
{
test
:
/
\.(
json5
?
|ya
?
ml
)
$/
,
// target json, json5, yaml and yml files
type
:
'
javascript/auto
'
,
loader
:
'
@intlify/vue-i18n-loader
'
,
include
:
[
// Use `Rule.include` to specify the files of locale messages to be pre-compiled
path
.
resolve
(
__dirname
,
'
src/i18n
'
)
]
},
]
},
plugins
:
[
...
...
This diff is collapsed.
Click to expand it.
src/i18n/messages.js
+
3
−
3
View file @
bd77f3a1
...
...
@@ -32,7 +32,7 @@ const loaders = {
pt
:
()
=>
import
(
'
./pt.json
'
),
ro
:
()
=>
import
(
'
./ro.json
'
),
ru
:
()
=>
import
(
'
./ru.json
'
),
te
:
()
=>
import
(
'
./te.json
'
),
//
te: () => import('./te.json'),
// buggy
uk
:
()
=>
import
(
'
./uk.json
'
),
zh
:
()
=>
import
(
'
./zh.json
'
),
zh_Hant
:
()
=>
import
(
'
./zh_Hant.json
'
)
...
...
@@ -41,12 +41,12 @@ const loaders = {
const
messages
=
{
languages
:
[
'
en
'
,
...
Object
.
keys
(
loaders
)],
default
:
{
en
:
require
(
'
./en.json
'
)
en
:
require
(
'
./en.json
'
)
.
default
},
setLanguage
:
async
(
i18n
,
language
)
=>
{
if
(
loaders
[
language
])
{
let
messages
=
await
loaders
[
language
]()
i18n
.
setLocaleMessage
(
language
,
messages
)
i18n
.
setLocaleMessage
(
language
,
messages
.
default
)
}
i18n
.
locale
=
language
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment