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

List:       kde-core-devel
Subject:    i18n patch for nsplugins
From:       Matthias Kiefer <matthias.kiefer () gmx ! net>
Date:       2001-02-07 17:30:45
[Download RAW message or body]

Hi,

please review this small patch for nsplugins. It fixes some i18n bugs and 
fills the Name and Comment entries in the generated .desktop files with 
translated strings where possible. 
Nevertheless the names of the mime types were in english, because they seem 
to be extracted from the plugin library. 
So I added an extra file mimetranslations.cpp, that should contain the most 
common mime types to get translated. I filled it with the contents of the 
generated cache file and if there are more common mime types, these should be 
in the file, too.

Is it okay to commit? 
Of course, this will add new messages for translations, so I will have to ask 
on the translators list first. But since these messages are there anyway, it 
does not make it worse, if it is possible to translate them.

kind regards,
   Matthias
-- 
Matthias Kiefer
E-Mail: kiefer@kde.org
KBabel: http://i18n.kde.org/tools/kbabel/




["mimetranslations.cpp" (text/x-c++)]

// This file contains names of common mime types
// of netscape plugins to make it possible to
// translate them.
i18n("mimetype","Shockwave Flash");
i18n("mimetype","FutureSplash Player");
i18n("mimetype"," MPEG animation");
i18n("mimetype"," Quicktime animation");
i18n("mimetype"," DL animation");
i18n("mimetype"," SGI animation");
i18n("mimetype"," IFF animation");
i18n("mimetype"," AVI animation");
i18n("mimetype"," FLI animation");
i18n("mimetype"," MIDI audio file");
i18n("mimetype"," MIDI audio file");
i18n("mimetype"," Soundracker audio Module");
i18n("mimetype"," MPEG audio");
i18n("mimetype"," Commodore 64 audio");
i18n("mimetype"," Basic audio file");
i18n("mimetype","Microsoft wave file");
i18n("mimetype"," TIFF image");
i18n("mimetype"," PNG image");
i18n("mimetype"," SUN raster image");
i18n("mimetype"," MPEG music resource locator");


["nsplugins.diff" (text/plain)]

? mimetranslations.cpp
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdebase/nsplugins/Makefile.am,v
retrieving revision 1.23
diff -u -r1.23 Makefile.am
--- Makefile.am	2001/01/16 23:03:29	1.23
+++ Makefile.am	2001/02/07 17:30:12
@@ -22,3 +22,11 @@
 nspluginscan_SOURCES = pluginscan.cpp
 nspluginscan_LDFLAGS =  $(KDE_RPATH) $(all_libraries)
 nspluginscan_LDADD = $(MOTIF_LIBS) $(LIB_KDEUI) $(LIB_KSYCOCA) -lXt
+
+
+messages:
+	$(EXTRACTRC) `find . -name *.ui` > rc.cpp
+	$(EXTRACTRC) `find . -name *.rc` >> rc.cpp
+	$(XGETTEXT) *.cpp control/*.cpp viewer/*.cpp -o $(podir)/nsplugin.pot
+
+
Index: pluginscan.cpp
===================================================================
RCS file: /home/kde/kdebase/nsplugins/pluginscan.cpp,v
retrieving revision 1.28
diff -u -r1.28 pluginscan.cpp
--- pluginscan.cpp	2001/01/26 08:13:57	1.28
+++ pluginscan.cpp	2001/02/07 17:30:14
@@ -134,9 +134,9 @@
         }
 
         if (!description.isEmpty())
-            ts << "Name=" << description << endl;
+            ts << "Name=" << i18n("mimetype",description.latin1()) << endl;
         else
-            ts << "Name=Netscape plugin mimeinfo" << endl;
+            ts << "Name=" << i18n("Netscape plugin mimeinfo") << endl;
 
         f.close();
     }
@@ -197,7 +197,7 @@
         }
 
         // ask for name and description
-        QString name = "Unnamed plugin";
+        QString name = i18n("Unnamed plugin");
         QString description;
 
         NPError (*func_GetValue)(void *, NPPVariable, void *) =
@@ -340,10 +340,10 @@
         QTextStream ts(&f);
 
         ts << "[Desktop Entry]" << endl;
-        ts << "Name=Netscape plugin viewer" << endl;
+        ts << "Name=" << i18n("Netscape plugin viewer") << endl;
         ts << "Type=Service" << endl;
         ts << "Icon=netscape" << endl;
-        ts << "Comment=Netscape plugin viewer" << endl;
+        ts << "Comment=" << i18n("Netscape plugin viewer") << endl;
         ts << "X-KDE-Library=libnsplugin" << endl;
         ts << "InitialPreference=0" << endl;
         ts << "ServiceTypes=KParts/ReadOnlyPart,Browser/View" << endl;
@@ -381,8 +381,9 @@
 {
     KAboutData aboutData( "nspluginscan", I18N_NOOP("nspluginscan"),
                           "0.3", "nspluginscan", KAboutData::License_GPL,
-                          I18N_NOOP("(c) 2000,2001 by Stefan Schimanski") );
+                          "(c) 2000,2001 by Stefan Schimanski" );
 
+    KLocale::setMainCatalogue("nsplugin");
     KCmdLineArgs::init( argc, argv, &aboutData );
     KApplication app;
 
Index: control/Makefile.am
===================================================================
RCS file: /home/kde/kdebase/nsplugins/control/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- control/Makefile.am	2000/12/11 09:25:09	1.6
+++ control/Makefile.am	2001/02/07 17:30:14
@@ -11,8 +11,5 @@
 
 DISTCLEANFILES = $(libkcm_nsplugin_la_METASOURCES)
 
-messages: rc.cpp
-	$(XGETTEXT) *.cpp -o $(podir)/nsplugin.pot
-
 data_DATA = nsplugin.desktop
 datadir = $(kde_appsdir)/Settings/WebBrowsing
Index: viewer/viewer.cpp
===================================================================
RCS file: /home/kde/kdebase/nsplugins/viewer/viewer.cpp,v
retrieving revision 1.19
diff -u -r1.19 viewer.cpp
--- viewer/viewer.cpp	2001/01/26 08:13:57	1.19
+++ viewer/viewer.cpp	2001/02/07 17:30:14
@@ -214,6 +214,7 @@
    kdDebug(1430) << "3 - parseCommandLine" << endl;
    parseCommandLine(argc, argv);
    kdDebug(1430) << "4 - KXtApplication app" << endl;
+   KLocale::setMainCatalogue("nsplugin");
    KXtApplication app(dpy, argc, argv, "nspluginviewer");
 
    // initialize the dcop client


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

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