aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNémeth Márton <nm127@freemail.hu>2012-06-01 09:23:14 +0200
committerChris E Ferron <chris.e.ferron@linux.intel.com>2012-06-01 10:05:37 -0700
commit4a41fcd2054807a046ec0e80d6eb03960fda14ec (patch)
tree12a07fe2d72ca6063838b5b29958ad4dc195be7c
parentad384e6cee7880abf3f7219d479a6c88d4b906bb (diff)
PowerTOP: _("Cannot load from file")
Hi Chris, Chris Ferron wrote: > On 05/30/2012 09:53 PM, Németh Márton wrote: >> Hi Chris, >> >> I have seen in commit 0e9374d27bfa51b885ee3fe69fbb3b12bdae3600 that >> the last space of the "Cannot load from file " was removed. This results >> even in English the following output: >> >> Cannot load from file/var/cache/powertop/saved_parameters.powertop >> >> One solution would be something like this: >> >> cout<< _("Cannot load from file")<< " "<< pathname<< "\n"; > Good input thank you. I am still learning about the difficulty's in > translation on internationalization. > I will make some adjustments from your input. See the attached patch what I really ment. Otherwise it could be also better as I described: >> However, in Hungarian this sentence is difficult to translate because of >> the word order. For example the natural translation of the following >> English sentence would be: >> >> English: Cannot load from file foo.bar >> Hungarian: Nem lehetett a foo.bar fájlból betölteni >> >> As you can see in this case it would be better to use the %s format string >> for printing pathname because this gives better flexibility for the translator >> to place the pathname string in natural place in a translated sentence. >> >> Regards, >> >> Márton Németh From: Márton Németh <nm127@freemail.hu> Fix space between localized string and pathname. Signed-off-by: Márton Németh <nm127@freemail.hu>
-rw-r--r--src/parameters/persistent.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp
index 47b8824..553cccb 100644
--- a/src/parameters/persistent.cpp
+++ b/src/parameters/persistent.cpp
@@ -43,7 +43,7 @@ void save_all_results(const char *filename)
file.open(pathname, ios::out);
if (!file) {
- cout << _("Cannot save to file ") << pathname << "\n";
+ cout << _("Cannot save to file") << " " << pathname << "\n";
return;
}
for (i = 0; i < past_results.size(); i++) {
@@ -75,7 +75,7 @@ void load_results(const char *filename)
file.open(pathname, ios::in);
if (!file) {
- cout << _("Cannot load from file ") << pathname << "\n";
+ cout << _("Cannot load from file") << " " << pathname << "\n";
return;
}
@@ -137,7 +137,7 @@ void save_parameters(const char *filename)
file.open(pathname, ios::out);
if (!file) {
- cout << _("Cannot save to file ")<< " "<< pathname << "\n";
+ cout << _("Cannot save to file") << " " << pathname << "\n";
return;
}
@@ -162,7 +162,7 @@ void load_parameters(const char *filename)
file.open(pathname, ios::in);
if (!file) {
- cout << _("Cannot load from file ")<< " "<< pathname << "\n";
+ cout << _("Cannot load from file") << " " << pathname << "\n";
return;
}