Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sync script for cron (not working correctly)
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# fetch new po files for spezific lang | ||
/opt/zanata/zanata-cli-3.8.1/bin/zanata-cli -B -q pull -l de | ||
|
||
# compile mo files | ||
for file in `find trans -name "*.po"` ; do msgfmt -o `echo $file | sed 's/\.po$/.mo/'` $file ; done | ||
|
||
# backup curret data | ||
tar cvfz backup_`date +%s`.tgz /opt/stack/horizon/horizon/locale/de/LC_MESSAGES /opt/stack/horizon/openstack_dashboard/locale/de/LC_MESSAGES | ||
|
||
# delete staff | ||
rm -f /opt/stack/horizon/horizon/locale/de/LC_MESSAGES/* | ||
rm -f /opt/stack/horizon/openstack_dashboard/locale/de/LC_MESSAGES/* | ||
|
||
# copy new content | ||
cp trans/horizon/locale/* /opt/stack/horizon/horizon/locale/de/LC_MESSAGES/ | ||
cp trans/openstack_dashboard/locale/* /opt/stack/horizon/openstack_dashboard/locale/de/LC_MESSAGES/ | ||
|
||
# reload apache | ||
sudo apache2ctl graceful | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<config xmlns="http://zanata.org/namespace/config/"> | ||
<url>https://translate.openstack.org:443/</url> | ||
<project>horizon</project> | ||
<project-version>stable-liberty</project-version> | ||
<project-type>gettext</project-type> | ||
<src-dir>.</src-dir> | ||
<trans-dir>trans</trans-dir> | ||
<includes>*</includes> | ||
<rules/> | ||
</config> |
f77cfbe
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.
this is not the correct file name and would not work
f77cfbe
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.
Use this zanata.xml (https://github.com/daisy-ycguo/translation_checksite/blob/zanata_xml/cron/zanata.xml), put it in the root folder of horizon project, and run "zanata-cli -B -e pull".
All translation files will be pulled into the specific folders.