From b92a10ea9861797d7fcfc02472af0963e6eab270 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 8 Dec 2014 14:09:34 -0700 Subject: Mark new string for translation This needs to be the same string as used for the entry in the Import dialog... since translate() is a macro in this .c file and defined to have only two arguments, I'm using the NOOP3 macro to get this correctly added to the translation sources, including the comment. That makes the code a little odd, but seems to work. Signed-off-by: Dirk Hohndel --- file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index 358397675..2892f621a 100644 --- a/file.c +++ b/file.c @@ -364,13 +364,18 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_ static int open_by_filename(const char *filename, const char *fmt, struct memblock *mem) { + // hack to be able to provide a comment for the translated string + static char *csv_warning = QT_TRANSLATE_NOOP3("gettextFromC", + "Cannot open CSV file %s; please use Import log file dialog", + "'Import log file' should be the same text as corresponding label in Import menu"); + /* Suunto Dive Manager files: SDE, ZIP; divelogs.de files: DLD */ if (!strcasecmp(fmt, "SDE") || !strcasecmp(fmt, "ZIP") || !strcasecmp(fmt, "DLD")) return try_to_open_zip(filename, mem); /* CSV files */ if (!strcasecmp(fmt, "CSV")) - return report_error("Cannot open CSV file %s; please use Import log file dialog", filename); + return report_error(translate("gettextFromC", csv_warning), filename); /* Truly nasty intentionally obfuscated Cochran Anal software */ if (!strcasecmp(fmt, "CAN")) return try_to_open_cochran(filename, mem); -- cgit v1.2.3-70-g09d2