cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [01/18] git commit: updated refs/heads/master to 21209a0
Date Sun, 27 Nov 2016 16:17:42 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e5efae6c1 -> 21209a06a


CLOUDSTACK-9621: Improve conversion Transifex's JSON format to CloudStack JS


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c238b12c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c238b12c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c238b12c

Branch: refs/heads/master
Commit: c238b12cd83a501d2f85beeea40cba70f52ff4e9
Parents: 185be24
Author: Milamber <milamber@apache.org>
Authored: Sun Nov 27 09:44:44 2016 +0000
Committer: Milamber <milamber@apache.org>
Committed: Sun Nov 27 11:02:26 2016 +0000

----------------------------------------------------------------------
 tools/transifex/sync-transifex-ui.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c238b12c/tools/transifex/sync-transifex-ui.sh
----------------------------------------------------------------------
diff --git a/tools/transifex/sync-transifex-ui.sh b/tools/transifex/sync-transifex-ui.sh
index a121fbd..0e3c494 100755
--- a/tools/transifex/sync-transifex-ui.sh
+++ b/tools/transifex/sync-transifex-ui.sh
@@ -77,7 +77,12 @@ doDownloadL10NLangs()
         # l10n languages
         for CODELANG in ${LIST_LANG} ; do
                 if [ -f "${WORKDIR}/${CODELANG}.json" ]; then
-                        sed -e '1s/^/var dictionary = /' -e "\$s/\}$/\};/" -e "1s~^~${AL2_STRING}~"
${WORKDIR}/${CODELANG}.json > ${DIRECTORY_RESOURCES}/${CODELANG}.js
+                        sed -e 's/":"/": "/' \
+                                -e 's/^/    /g' \
+                                -e '1s/^    {/var dictionary = {\n    /' \
+                                -e '$s/\}$/\n\};/' \
+                                -e "1s~^~${AL2_STRING}~" \
+                                ${WORKDIR}/${CODELANG}.json > ${DIRECTORY_RESOURCES}/${CODELANG}.js
                 else   
                         echo "Warning: the resource file for language ${CODELANG} doesn't
exist on transifex"
                 fi
@@ -102,7 +107,12 @@ doDownloadSourceLang()
         tx pull -s -r ${ARGUMENTS} 
         # Source language
         if [ -f "${WORKDIR}/${SRCLANG}.json" ]; then
-                sed -e '1s/^/var dictionary = /' -e "\$s/\}$/\};/" -e "1s~^~${AL2_STRING}~"
${WORKDIR}/${SRCLANG}.json > ${DIRECTORY_RESOURCES}/${SRCLANG}.js
+                sed -e 's/":"/": "/' \
+                        -e 's/^/    /g' \
+                        -e '1s/^    {/var dictionary = {\n    /' \
+                        -e '$s/\}$/\n\};/' \
+                        -e "1s~^~${AL2_STRING}~" \
+                        ${WORKDIR}/${SRCLANG}.json > ${DIRECTORY_RESOURCES}/${SRCLANG}.js
         else
                 echo "Warning: the source language hasn't been retrieve!"
         fi


Mime
View raw message