[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    l10n-kde4/scripts
From:       Stephan Kulow <coolo () kde ! org>
Date:       2009-09-16 10:57:52
Message-ID: 1253098672.629279.13851.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1024302 by coolo:

do not use fallback languages (e.g. pt for pt_BR)


 M  +8 -2      applycontext.cpp  
 M  +2 -2      merge_desktop_files.sh  


--- trunk/l10n-kde4/scripts/applycontext.cpp #1024301:1024302
@@ -1708,8 +1708,10 @@
                 }
 
 		for (int i = 2; i < argc; i++) {
+			char domain[PATH_MAX];
+			sprintf(domain, "apply_%s", argv[i]);
                         // Unlike for KDE3, the translated string has not the key!
-			const char *test = k_dcgettext(argv[0], lookup, argv[i]);
+			const char *test = k_dcgettext(domain, lookup, "abc");
 			
                         if ( test == lookup ) {
                                 // Exactly the same pointer, so there was no translation
@@ -1792,7 +1794,11 @@
     else
 	strcpy(kdedir, "/tmp/kde");
     strcat(kdedir, "/share/locale");
-    k_bindtextdomain(argv[0], kdedir);
+    for (int i = 2; i < argc; i++) {
+            char domain[PATH_MAX];
+            sprintf(domain, "apply_%s", argv[i]);
+            k_bindtextdomain(domain, kdedir);
+    }
 
     FILE *f = fopen(argv[1], "rt");
 
--- trunk/l10n-kde4/scripts/merge_desktop_files.sh #1024301:1024302
@@ -30,8 +30,8 @@
         continue
       fi
     fi
-    mkdir -p $KDEDIR/share/locale/$lang/LC_MESSAGES
-    if ! msgfmt $file -o $KDEDIR/share/locale/$lang/LC_MESSAGES/apply.mo; then 
+    mkdir -p $KDEDIR/share/locale/abc/LC_MESSAGES
+    if ! msgfmt $file -o $KDEDIR/share/locale/abc/LC_MESSAGES/apply_$lang.mo; then 
             echo "ERROR: file $file could not be processed by msgfmt!"
             continue
     fi
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic