Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
translation_helper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Binet Réseau
translation_helper
Compare revisions
master to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
br/translation_helper
Select target project
No results found
master
Select Git revision
Branches
master
Swap
Target
guillaume.premel/translation_helper
Select target project
guillaume.premel/translation_helper
1 result
master
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Use markdown syntax for code snippets
· df6f0477
Sosthène GUéDON
authored
4 years ago
df6f0477
Fix missing backtick
· 0cd8b865
Sosthène GUéDON
authored
4 years ago
0cd8b865
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+35
-29
35 additions, 29 deletions
README.md
with
35 additions
and
29 deletions
README.md
View file @
0cd8b865
...
...
@@ -5,48 +5,54 @@ Utility script aimed at easing translators' work
## How to use
<code>
./translation_helper.py file1 file2
</code>
```
bash
./translation_helper.py file1 file2
```
The script will read
<code>
file1
</code>
's structure and try to find a match in
</code>
file2
</code>
. If there is not such match, it will prompt the user to give
The script will read
`file1`
's structure and try to find a match in
`file2`
. If there is not such match, it will prompt the user to give
a translation.
For instance, if
<code>
file1
</code>
's structure is:
For instance, if
`file1`
's structure is:
<code>
"components": {
"greetings": {
"morning": "Good morning !",
"afternon": "Good afternoon !"
}
}
</code>
```
JSON
"components": {
"greetings": {
"morning": "Good morning !",
"afternon": "Good afternoon !"
}
}
```
And
<code>
file2
</code>
's structure is
And
`file2`
's structure is
<code>
"components": {
"greetings": {
"morning": "Bonjour !",
}
}
</code>
```
JSON
"components": {
"greetings": {
"morning": "Bonjour !",
}
}
```
`
By running
<code>
./translation_helper.py file1 file2
</code>
, the user will see:
By running
`
./translation_helper.py file1 file2
`
, the user will see:
<code>
[components.greetings] afternoon
```
[components.greetings] afternoon
Good afternoon !
</code>
```
By typing
<code>
Bonne après-midi !
</code>
, file2's structure will be altered and
By typing
`
Bonne après-midi !
`
,
`
file2
`
's structure will be altered and
written to disk to become
<code>
"components": {
"greeting
s": {
"morn
ing":
"Bonjour !",
"afternoon": "Bonne après-midi
!"
}
}
</code>
```JSON
"component
s": {
"greet
ing
s
":
{
"morning": "Bonjour
!"
,
"afternoon": "Bonne après-midi !"
}
}
``
`
## Use cases
...
...
This diff is collapsed.
Click to expand it.