mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Trying to switch to Qt translation
This compiles and looks about right, but it doesn't appear to work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2c4ccc04bd
commit
4d3e74a236
24 changed files with 272 additions and 294 deletions
15
file.c
15
file.c
|
@ -4,12 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#if 0
|
||||
#include <glib/gi18n.h>
|
||||
#else /* stupid */
|
||||
#define _(arg) arg
|
||||
#define N_(arg) arg
|
||||
#endif
|
||||
#include "gettext.h"
|
||||
#include <zip.h>
|
||||
|
||||
#include "dive.h"
|
||||
|
@ -108,9 +103,9 @@ static int try_to_xslt_open_csv(const char *filename, struct memblock *mem, char
|
|||
|
||||
if (readfile(filename, mem) < 0) {
|
||||
if (error) {
|
||||
int len = strlen(_("Failed to read '%s'")) + strlen(filename);
|
||||
int len = strlen(tr("Failed to read '%s'")) + strlen(filename);
|
||||
*error = malloc(len);
|
||||
snprintf(*error, len, _("Failed to read '%s'"), filename);
|
||||
snprintf(*error, len, tr("Failed to read '%s'"), filename);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -305,9 +300,9 @@ void parse_file(const char *filename, char **error)
|
|||
return;
|
||||
|
||||
if (error) {
|
||||
int len = strlen(_("Failed to read '%s'")) + strlen(filename);
|
||||
int len = strlen(tr("Failed to read '%s'")) + strlen(filename);
|
||||
*error = malloc(len);
|
||||
snprintf(*error, len, _("Failed to read '%s'"), filename);
|
||||
snprintf(*error, len, tr("Failed to read '%s'"), filename);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue