[rkward-cvs] [rkward] rkward/plugin: Remove experimental static i18n support.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Fri Nov 28 13:05:39 UTC 2014


Git commit 32c21fe76d710013bd385c77d5bd5a966bf6110c by Thomas Friedrichsmeier.
Committed on 28/11/2014 at 13:05.
Pushed by tfry into branch 'master'.

Remove experimental static i18n support.

M  +0    -35   rkward/plugin/rkcomponentmap.cpp

http://commits.kde.org/rkward/32c21fe76d710013bd385c77d5bd5a966bf6110c

diff --git a/rkward/plugin/rkcomponentmap.cpp b/rkward/plugin/rkcomponentmap.cpp
index 0cde1a4..e377b6e 100644
--- a/rkward/plugin/rkcomponentmap.cpp
+++ b/rkward/plugin/rkcomponentmap.cpp
@@ -463,41 +463,6 @@ RKPluginMapParseResult RKComponentMap::addPluginMapLocal (const QString& plugin_
 	for (XMLChildList::const_iterator it=list.constBegin (); it != list.constEnd (); ++it) {
 		if ((*it).hasAttribute ("file")) {
 			QString file = pluginmap_file_desc->makeFileName (xml.getStringAttribute (*it, "file", QString (), DL_ERROR));
-			/// EXPERIMENTAL: Look for localized version of required pluginmap
-			if (xml.getBoolAttribute (*it, "localized", false, DL_INFO)) {
-				QFileInfo fi(file);
-				QDir dir = fi.absoluteDir ();
-				QString fn = fi.fileName ();
-				QString lang = KGlobal::locale ()->language ();
-				RK_DEBUG (PLUGIN, DL_INFO, "Looking for localized version of %s, (locale is %s)", qPrintable (file), qPrintable (lang));
-				QString country = lang.section ('_', 1, 1);	// in case it's something like 'de_DE'
-				lang = lang.section ('_', 0, 0);
-				QStringList candidates = dir.entryList (QStringList () << lang + "*." + fn);
-				QString plain_match, exact_match;
-				// if full language code is 'de_DE', look for (in order of preference):
-				// de_DE, de, de_SOMETHING
-				for (int i = 0; i < candidates.length (); ++i) {
-					if (candidates[i] == lang + '_' + country + '.' + fn) {
-						exact_match = candidates[i];
-						break;
-					} else if (candidates[i] == lang + '.' + fn) {
-						plain_match = candidates[i];
-					}
-				}
-				if (!exact_match.isEmpty ()) {
-					file = dir.absoluteFilePath (exact_match);
-					RK_DEBUG (PLUGIN, DL_INFO, "Found exact match");
-				} else if (!plain_match.isEmpty ()) {
-					file = dir.absoluteFilePath (plain_match);
-					RK_DEBUG (PLUGIN, DL_INFO, "Found language match");
-				} else if (!candidates.isEmpty ()) {
-					file = dir.absoluteFilePath (candidates[0]);
-					RK_DEBUG (PLUGIN, DL_INFO, "Using %s as best match");
-				} else {
-					RK_DEBUG (PLUGIN, DL_INFO, "No suitable localized version found");
-				}
-			}
-			/// END
 			if (QFileInfo (file).isReadable ()) {
 				includelist.append (file);
 			} else {




More information about the rkward-tracker mailing list