Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vladimir KozLove
bitmask-vpn
Commits
3312593a
Unverified
Commit
3312593a
authored
6 years ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
[locales] improve the locales workflow and document it
parent
c5f33ab5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+2
-2
2 additions, 2 deletions
Makefile
README.md
+8
-6
8 additions, 6 deletions
README.md
with
10 additions
and
8 deletions
Makefile
+
2
−
2
View file @
3312593a
...
...
@@ -41,7 +41,7 @@ lang_list := $(subst $(space),,$(foreach lang,$(LANGS),$(lang),))
locales
:
$(foreach lang
,
$(LANGS)
,
get_$(lang)) cmd/bitmask-vpn/catalog.go
generate_locales
:
gotext update ./pkg/systray ./pkg/bitmask
gotext update
-lang
=
$(
lang_list
)
./pkg/systray ./pkg/bitmask
make
-C
tools/transifex
locales/%/out.gotext.json
:
pkg/systray/systray.go pkg/systray/notificator.go pkg/bitmask/standalone.go pkg/bitmask/bitmaskd.go
...
...
@@ -50,6 +50,6 @@ locales/%/out.gotext.json: pkg/systray/systray.go pkg/systray/notificator.go pkg
cmd/bitmask-vpn/catalog.go
:
$(foreach lang
,
$(LANGS)
,
locales/$(lang)/messages.gotext.json)
gotext update
-lang
=
$(
lang_list
)
-out
cmd/bitmask-vpn/catalog.go ./pkg/systray ./pkg/bitmask
get_%
:
get_%
:
locales/%/out.gotext.json
make
-C
tools/transifex build
curl
-L
-X
GET
--user
"api:
${
API_TOKEN
}
"
"https://www.transifex.com/api/2/project/bitmask/resource/RiseupVPN/translation/
${
subst -,_,
$*
}
/?file"
| tools/transifex/transifex t2g locales/
$*
/
This diff is collapsed.
Click to expand it.
README.md
+
8
−
6
View file @
3312593a
...
...
@@ -78,17 +78,19 @@ In that case bitmask-systray assumes that you already have bitmaskd running. Run
i18n
----
Generate
`locales/*`
fi
les:
When a string has being modified you need to regenerate the loca
les:
```
$ make generate_locales
LANGS="sjn tlh"
$ make generate_locales
```
Edit the
`locales/*/out.gotext.json`
translations into
`locales/*/messages.gotext.json`
.
To rebuild the locales:
To fetch the translations from transifex and rebuild the catalog.go (API
\_
TOKEN is the transifex API token):
```
$ make locales
$
API_TOKEN='xxxxxxxxxxx'
make locales
```
There is some bug on gotext and the catalog.go generated doesn't have a package, you will need to edit
cmd/bitmask-vpn/catalog.go and to have a
`package main`
at the beginning of the file.
If you want to add a new language create the folder
`locales/$lang`
before running
`make locales`
.
Report an issue
...
...
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