[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: KDE_3_2_BRANCH: kdelibs/kate/part
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2004-03-19 0:04:57
Message-ID: 20040319000457.B7973999A () office ! kde ! org
[Download RAW message or body]
CVS commit by goutte:
Translate language section names
CCMAIL:72220@bugs.kde.org
CCMAIL:kde-i18n-doc@kde.org
M +14 -14 katesyntaxdocument.cpp 1.36.2.2
--- kdelibs/kate/part/katesyntaxdocument.cpp #1.36.2.1:1.36.2.2
@@ -371,6 +371,6 @@ void SyntaxDocument::setupModeList (bool
// Let's make a new syntaxModeListItem to instert in myModeList from the \
information in katesyntax..rc syntaxModeListItem *mli=new syntaxModeListItem;
- mli->name = config.readEntry("name");
- mli->section = i18n(config.readEntry("section").utf8());
+ mli->name = config.readEntry("name"); // ### TODO: translation (bug \
#72220) + mli->section = i18n("Language \
Section",config.readEntry("section").utf8()); mli->mimetype = \
config.readEntry("mimetype"); mli->extension = config.readEntry("extension");
@@ -411,10 +411,5 @@ void SyntaxDocument::setupModeList (bool
mli->name = root.attribute("name");
- // Is this safe for translators ? I mean, they must add by hand the \
transalation for each section.
- // This could be done by a switch or ifs with the allowed sections but \
a new
- // section will can't be added without recompiling and it's not a very \
versatil
- // way, adding a new section (from the xml files) would break the \
translations.
- // Why don't we store everything in english internaly and we translate \
it just when showing it.
- mli->section = i18n(root.attribute("section").utf8());
+ mli->section = root.attribute("section");
mli->mimetype = root.attribute("mimetype");
mli->extension = root.attribute("extensions");
@@ -422,8 +417,4 @@ void SyntaxDocument::setupModeList (bool
mli->priority = root.attribute("priority");
- // I think this solves the problem, everything not in the .po is \
Other.
- if (mli->section.isEmpty())
- mli->section=i18n("Other");
-
mli->identifier = *it;
@@ -431,4 +422,7 @@ void SyntaxDocument::setupModeList (bool
config.setGroup(Group);
config.writeEntry("name",mli->name);
+ if (mli->section.isEmpty()) // ### TODO: can this happen at all?
+ config.writeEntry("section","Other");
+ else
config.writeEntry("section",mli->section);
config.writeEntry("mimetype",mli->mimetype);
@@ -437,4 +431,10 @@ void SyntaxDocument::setupModeList (bool
config.writeEntry("priority",mli->priority);
+ // Now that the data is in the config file, translate section
+ if (mli->section.isEmpty()) // ### TODO: can this happen at all?
+ mli->section = i18n("Language Section",mli->section.utf8());
+ else
+ mli->section = i18n("Language Section","Other"); // We need the \
i18n context for when reading again the config +
// Append the new item to the list.
myModeList.append(mli);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic