dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30248
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15346: Minor fix to translation cleaning script.
------------------------------------------------------------
revno: 15346
committer: Jason P. Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-05-22 09:49:31 +0200
message:
Minor fix to translation cleaning script.
modified:
resources/util/cleanTranslations.R
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'resources/util/cleanTranslations.R'
--- resources/util/cleanTranslations.R 2014-05-22 07:37:36 +0000
+++ resources/util/cleanTranslations.R 2014-05-22 07:49:31 +0000
@@ -33,9 +33,11 @@
require(plyr)
require(stringr)
#If you are exeucting from the command line, you will need to give the working directory
-wd<-cmd_args[6]
+args <- commandArgs(trailingOnly = TRUE)
+wd<-args[1]
+if (length(args) != 2) { stop("Usage: Rscript cleanTranslations.R DHIS2_SOURCE_DIR LANGUAGE_CODE") }
#A regular expression of language to clean
-languages<-"_fr"
+languages<-paste0("_",args[2])
allprops<-dir(wd, pattern = "i18.*\\.properties$", full.names = TRUE, recursive=TRUE)
allprops<-allprops[grepl("src",allprops)]