← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17496: (Translations) Minor adjustment to translation script to avoid problems with duplicate keys in te...

 

------------------------------------------------------------
revno: 17496
committer: Jason Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-11-17 05:53:35 -0500
message:
  (Translations) Minor adjustment to translation script to avoid problems with duplicate keys in template files.
modified:
  resources/util/clean_translations.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/clean_translations.R'
--- resources/util/clean_translations.R	2014-08-22 08:43:25 +0000
+++ resources/util/clean_translations.R	2014-11-17 10:53:35 +0000
@@ -62,6 +62,8 @@
 template$template_order<-row.names(template)
 #Remove the periods formats. They will never be translated
 template<-template[!grepl("^format\\.",template$key),]
+#Remove any duplicate keys as this causes big problems
+template<-template[!duplicated(template$key),]
 
 #Loop through each file, cleaning out needless translations
 for (j in 1:length(this.files)) {