mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
Fix compilation errors for non-English languages.
This commit is contained in:
@@ -39,13 +39,14 @@ BANNER Rappels pour %w, %d%s %m, %y%o:
|
|||||||
# Ordinal for a day (English would be "st", "nd", "rd", "th")
|
# Ordinal for a day (English would be "st", "nd", "rd", "th")
|
||||||
FSET subst_ordinal(d) iif(d == 1, "er", "")
|
FSET subst_ordinal(d) iif(d == 1, "er", "")
|
||||||
|
|
||||||
FSET subst_fr_tdiff(hdiff, mdiff) iif(hdiff==0&&mdiff==0, $Now, \
|
# "%d hours", "%d minutes", or "%d hours and %d minutes"
|
||||||
|
FSET subst_tdiff(hdiff, mdiff) iif(hdiff==0&&mdiff==0, $Now, \
|
||||||
hdiff==0, mdiff + plural(mdiff, " minute"), \
|
hdiff==0, mdiff + plural(mdiff, " minute"), \
|
||||||
mdiff==0, hdiff + plural(hdiff, " heure"), \
|
mdiff==0, hdiff + plural(hdiff, " heure"), \
|
||||||
hdiff + plural(hdiff, " heure") + " et " + mdiff + plural(mdiff, " minute"))
|
hdiff + plural(hdiff, " heure") + " et " + mdiff + plural(mdiff, " minute"))
|
||||||
FSET subst_1(alt, date, time) iif(time == now(), "maintenant", \
|
FSET subst_1(alt, date, time) iif(time == now(), "maintenant", \
|
||||||
time > now(), "dans " + subst_fr_tdiff((time-now())/60, (time-now())%60), \
|
time > now(), "dans " + subst_tdiff((time-now())/60, (time-now())%60), \
|
||||||
"il y a " + subst_fr_tdiff ((now()-time)/60, (now()-time)%60))
|
"il y a " + subst_tdiff ((now()-time)/60, (now()-time)%60))
|
||||||
|
|
||||||
FSET subst_j_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + " " + year(date)
|
FSET subst_j_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + " " + year(date)
|
||||||
FSET subst_j(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_alt(date))
|
FSET subst_j(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_alt(date))
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ install-nostripped: all
|
|||||||
for man in $(MANS) ; do \
|
for man in $(MANS) ; do \
|
||||||
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/man1 || exit 1; \
|
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/man1 || exit 1; \
|
||||||
done
|
done
|
||||||
-mkdir -p $(DESTDIR)$(datarootdir)/remind || true
|
-mkdir -p $(DESTDIR)$(datarootdir)/remind/lang || true
|
||||||
for l in $(LANGS) ; do \
|
for l in $(LANGS) ; do \
|
||||||
$(INSTALL_DATA) ../include/lang/$$l $(DESTDIR)$(datarootdir)/remind || exit 1; \
|
$(INSTALL_DATA) ../include/lang/$$l $(DESTDIR)$(datarootdir)/remind/lang || exit 1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install: install-nostripped
|
install: install-nostripped
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
EXTERN FILE *ErrFp;
|
||||||
|
|
||||||
#include "dynbuf.h"
|
#include "dynbuf.h"
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
@@ -98,7 +99,6 @@ EXTERN INIT( char *FileName, NULL);
|
|||||||
EXTERN INIT( int UseStdin, 0);
|
EXTERN INIT( int UseStdin, 0);
|
||||||
EXTERN INIT( int PurgeMode, 0);
|
EXTERN INIT( int PurgeMode, 0);
|
||||||
EXTERN INIT( int PurgeIncludeDepth, 0);
|
EXTERN INIT( int PurgeIncludeDepth, 0);
|
||||||
EXTERN FILE *ErrFp;
|
|
||||||
EXTERN INIT( FILE *PurgeFP, NULL);
|
EXTERN INIT( FILE *PurgeFP, NULL);
|
||||||
EXTERN INIT( int NumIfs, 0);
|
EXTERN INIT( int NumIfs, 0);
|
||||||
EXTERN INIT( unsigned int IfFlags, 0);
|
EXTERN INIT( unsigned int IfFlags, 0);
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "globals.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "err.h"
|
#include "err.h"
|
||||||
#include "globals.h"
|
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -72,13 +72,17 @@
|
|||||||
# define L_IS "będzie"
|
# define L_IS "będzie"
|
||||||
# define L_WAS "było"
|
# define L_WAS "było"
|
||||||
#define L_AND "i"
|
#define L_AND "i"
|
||||||
|
|
||||||
|
#define L_HPLU ""
|
||||||
|
#define L_MPLU ""
|
||||||
|
|
||||||
/* What to add to make "hour" or "minute" plural */
|
/* What to add to make "hour" or "minute" plural */
|
||||||
#define L_NPLU( N ) ((N == 1) ? "ę" : ((N==12) || (N==13) || (N==14)) ? "" : \
|
#define L_NPLU( N ) ((N == 1) ? "ę" : ((N==12) || (N==13) || (N==14)) ? "" : \
|
||||||
((N%10==2) || (N%10==3) || (N%10==4)) ? "y" : "" )
|
((N%10==2) || (N%10==3) || (N%10==4)) ? "y" : "" )
|
||||||
/* What to add to make "hour" plural */
|
/* What to add to make "hour" plural */
|
||||||
#define L_HPLU L_NPLU( hdiff )
|
#define L_HPLU_OVER hplu = L_NPLU( hdiff );
|
||||||
/* What to add to make "minute" plural */
|
/* What to add to make "minute" plural */
|
||||||
#define L_MPLU L_NPLU( mdiff )
|
#define L_MPLU_OVER mplu = L_NPLU( mdiff );
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||||
See the file dosubst.c for more info. */
|
See the file dosubst.c for more info. */
|
||||||
@@ -96,30 +100,30 @@ ampm = (hour<12) ? \
|
|||||||
#define L_U_OVER L_A_OVER
|
#define L_U_OVER L_A_OVER
|
||||||
#define L_V_OVER L_G_OVER
|
#define L_V_OVER L_G_OVER
|
||||||
|
|
||||||
#define L_0_OVER sprintf(s, L_HPLU);
|
#define L_0_OVER sprintf(s, L_NPLU(hdiff));
|
||||||
#define L_9_OVER sprintf(s, L_MPLU);
|
#define L_9_OVER sprintf(s, L_NPLU(mdiff));
|
||||||
#define L_1_OVER \
|
#define L_1_OVER \
|
||||||
if (tdiff == 0) \
|
if (tdiff == 0) \
|
||||||
sprintf(s, L_NOW); \
|
sprintf(s, L_NOW); \
|
||||||
else if (tdiff > 0) \
|
else if (tdiff > 0) \
|
||||||
{ \
|
{ \
|
||||||
if (hdiff == 0) \
|
if (hdiff == 0) \
|
||||||
sprintf(s, "za %d %s%s", mdiff, L_MINUTE, L_MPLU); \
|
sprintf(s, "za %d %s%s", mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
||||||
else if (mdiff == 0) \
|
else if (mdiff == 0) \
|
||||||
sprintf(s, "za %d %s%s", hdiff, L_HOUR, L_HPLU); \
|
sprintf(s, "za %d %s%s", hdiff, L_HOUR, L_NPLU(hdiff)); \
|
||||||
else \
|
else \
|
||||||
sprintf(s, "za %d %s%s %s %d %s%s", hdiff, L_HOUR, L_HPLU, \
|
sprintf(s, "za %d %s%s %s %d %s%s", hdiff, L_HOUR, L_NPLU(hdiff), \
|
||||||
L_AND, mdiff, L_MINUTE, L_MPLU); \
|
L_AND, mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
if (hdiff == 0) \
|
if (hdiff == 0) \
|
||||||
sprintf(s, "%d %s%s temu", mdiff, L_MINUTE, L_MPLU); \
|
sprintf(s, "%d %s%s temu", mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
||||||
else if (mdiff == 0) \
|
else if (mdiff == 0) \
|
||||||
sprintf(s, "%d %s%s temu", hdiff, L_HOUR, L_HPLU); \
|
sprintf(s, "%d %s%s temu", hdiff, L_HOUR, L_NPLU(hdiff)); \
|
||||||
else \
|
else \
|
||||||
sprintf(s, "%d %s%s %s %d %s%s temu", hdiff, L_HOUR, L_HPLU, \
|
sprintf(s, "%d %s%s %s %d %s%s temu", hdiff, L_HOUR, L_NPLU(hdiff), \
|
||||||
L_AND, mdiff, L_MINUTE, L_MPLU); \
|
L_AND, mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The next ones are used only when MK_GLOBALS is set */
|
/* The next ones are used only when MK_GLOBALS is set */
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
#define L_WAS "a fost"
|
#define L_WAS "a fost"
|
||||||
/* What to add to make "minute" plural */
|
/* What to add to make "minute" plural */
|
||||||
#define L_MPLU "e"
|
#define L_MPLU "e"
|
||||||
|
#define L_HPLU "e"
|
||||||
|
|
||||||
/* What to add to make "hour" plural */
|
/* What to add to make "hour" plural */
|
||||||
#define L_HPLU_OVER hplu = (hdiff == 1 ? "ă" : "e");
|
#define L_HPLU_OVER hplu = (hdiff == 1 ? "ă" : "e");
|
||||||
|
|||||||
@@ -155,10 +155,6 @@ void FindToken(char const *s, Token *tok)
|
|||||||
int top, bot, mid, r, max;
|
int top, bot, mid, r, max;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
#if LANG != ENGLISH
|
|
||||||
size_t i;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tok->type = T_Illegal;
|
tok->type = T_Illegal;
|
||||||
if (! *s) {
|
if (! *s) {
|
||||||
tok->type = T_Empty;
|
tok->type = T_Empty;
|
||||||
|
|||||||
Reference in New Issue
Block a user