Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a1297cd4
Commit
a1297cd4
authored
Nov 06, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make a note of which files to check in after externalizing strings
parent
5c147b6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
doc/development/i18n/externalization.md
doc/development/i18n/externalization.md
+12
-15
No files found.
doc/development/i18n/externalization.md
View file @
a1297cd4
...
@@ -110,7 +110,7 @@ You can mark that content for translation with:
...
@@ -110,7 +110,7 @@ You can mark that content for translation with:
In JavaScript we added the
`__()`
(double underscore parenthesis) function
In JavaScript we added the
`__()`
(double underscore parenthesis) function
for translations.
for translations.
##
#
Updating the PO files with the new content
## Updating the PO files with the new content
Now that the new content is marked for translation, we need to update the PO
Now that the new content is marked for translation, we need to update the PO
files with the following command:
files with the following command:
...
@@ -119,23 +119,20 @@ files with the following command:
...
@@ -119,23 +119,20 @@ files with the following command:
bundle
exec
rake gettext:find
bundle
exec
rake gettext:find
```
```
This command will update the
`locale/**/gitlab.edit.po`
file with the
This command will update the
`locale/gitlab.pot`
file with the newly externalized
new content that the parser has found.
strings and remove any strings that aren't used anymore. You should check this
file in. Once the changes are on master, they will be picked up by
[
Crowdin
](
http://translate.gitlab.com
)
and be presented for translation.
New translations will be added with their default content and will be marked
The command also updates the translation files for each language:
`locale/*/gitlab.po`
fuzzy. To use the translation, look for the
`#, fuzzy`
mention in
`gitlab.edit.po`
These changes can be discarded, the languange files will be updated by Crowdin
a
nd remove it
.
a
utomatically
.
We need to make sure we remove the
`fuzzy`
translations before generating the
Discard all of them at once like this:
`locale/**/gitlab.po`
file. When they aren't removed, the resulting
`.po`
will
be treated as a binary file which could overwrite translations that were merged
before the new translations.
When we are just preparing a page to be translated, but not actually adding any
```
sh
translations. There's no need to generate
`.po`
files.
git checkout locale/
*
/gitlab.po
```
Translations that aren't used in the source code anymore will be marked with
`~#`
; these can be removed to keep our translation files clutter-free.
### Validating PO files
### Validating PO files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment