summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-08 14:09:34 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-08 14:30:08 -0700
commitb92a10ea9861797d7fcfc02472af0963e6eab270 (patch)
tree3c470d2fdea5fd32c06299c5c9145de7fd4cacaa /file.c
parentb8511467b34c1a77aad1d28c36d833f869196e15 (diff)
downloadsubsurface-b92a10ea9861797d7fcfc02472af0963e6eab270.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 6 insertions, 1 deletions
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);