-
Notifications
You must be signed in to change notification settings - Fork 474
Improve indico i18n
CLI to support plugin-related i18n operations
#5961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3471225
to
3daa79c
Compare
43e77b0
to
44c05bd
Compare
ca77ce3
to
11538dd
Compare
e31c0f3
to
0a5d768
Compare
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.
LGTM, thanks!
0a5d768
to
23e7900
Compare
Is pulling/pushing for plugins not supported on purpose? |
Compiling plugin resources doesn't seem to work at all. To reproduce:
|
This is odd, do you have .po files for that plugin? |
yes, i freshly fetched them from transifex |
139cd27
to
39e3827
Compare
Changes made:
and
Language to pull can also be passed like
The command push/pull for
|
bde9584
to
c7fc311
Compare
c7fc311
to
821be87
Compare
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.
WTF, not sure why i never submitted these review comments...
821be87
to
cd29184
Compare
indico i18n
CLI to support plugin-related i18n operations
For some reason transifex adds this flag for plugin resources...
cd29184
to
67e970f
Compare
9d8966c
to
e7e72fd
Compare
Indico i18n Improvements
Closes #5906
The commands look like this:
As seen above, commands are grouped by the operation to be performed,
init, extract, update and compile
Furthermore,
indico i18n compile --help
shows we can pass eitherindico
,plugins
orall-plugins
Running the command like that e..g
indico i18n compile indico
would apply for python, javascript and react. If you want to specify a resource then pass the flag--python
,--javascript
,--react
.As seen above, there is also a
--no-check
option for the compilation command.The
extract
andupdate
commands are pretty much the same with the exception that they allow the--javascript
flag and do not have a--no-check
option.The
init
command requires an additional locale argument and can be used like this:In addition, there is now a pull and push command to pull and push from Transifex. This only applies to Indico translations on transifex.
The pull command can take in
languages
as argument to pull only those specific languages and performs the language code rename.Plugins
The command for the plugins are the same as above, except that you specify
plugins
orall-plugins
instead ofindico
and also pass in the plugin pathCan be used like:
You can also target only
--python
,--javascript
or--react
e.g
The same applies to
all-plugins
e.g.So for your common operations, you would most likely only need to do:
and then