Skip to content

Commit

Permalink
Locale translation file updates.
Browse files Browse the repository at this point in the history
Move the scripts to update and build the LC_MESSAGE localization
files out of automake makefiles (these are not used in the build
anyways, but must be manually ran by translators). The automake file
now only installs/uninstalls the LC_MESSAGE files for each language.

There is a new script, po/fvwmpo.sh, which can be used to update
the main pot file, initialize, update, and build the language files
for the strings that gettext translates. This does essentially the
same thing the make targets use to.

Move all the translations into a single fvwm3.pot file (which
merges the FvwmScript.pot file into the fvwm3.pot file). The file
has also been renamed from fvwm.pot to fvwm3.pot to allow it to be
installed along size fvwm2.

Last, this updates the template, and merges all translation files
to be in line with the current template, and rebuilds all the .gmo
files that get installed into the locale directory.
  • Loading branch information
somiaj committed Oct 3, 2024
1 parent 43870cd commit 63e56f7
Show file tree
Hide file tree
Showing 62 changed files with 8,192 additions and 9,171 deletions.
9 changes: 3 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1108,15 +1108,12 @@ AC_ARG_ENABLE(perllib,
AC_SUBST(FVWM_PERLLIB)

# ******* gettext
ALL_LINGUAS="ar da de fr sv_SE zh_CN ru es"
FVWM_DOMAIN="fvwm"
FVWMSCRIPT_DOMAIN="FvwmScript"
ALL_DOMAINS="$FVWM_DOMAIN $FVWMTASKBAR_DOMAIN $FVWMSCRIPT_DOMAIN"
ALL_LINGUAS="ar da de es fr ru sv_SE zh_CN zh_TW"
FVWM_DOMAIN="fvwm3"
ALL_DOMAINS="$FVWM_DOMAIN"

AC_SUBST(ALL_LINGUAS)
AC_SUBST(FVWM_DOMAIN)
AC_SUBST(FVWMTASKBAR_DOMAIN)
AC_SUBST(FVWMSCRIPT_DOMAIN)
AC_SUBST(ALL_DOMAINS)

LOCALEDIR="$FVWM_DATADIR/locale"
Expand Down
4 changes: 2 additions & 2 deletions fvwm/fvwm3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,8 @@ int main(int argc, char **argv)
}
g_argv[g_argc] = NULL;

FlocaleInit(LC_CTYPE, "", "", "fvwm");
FGettextInit("fvwm", LOCALEDIR, "fvwm");
FlocaleInit(LC_CTYPE, "", "", "fvwm3");
FGettextInit("fvwm3", LOCALEDIR, "fvwm3");

setVersionInfo();
/* Put the default module directory into the environment so it can be
Expand Down
2 changes: 1 addition & 1 deletion fvwm/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ static Bool size_menu_vertically(MenuSizingParameters *msp)
/* don't propagate sidepic, sidecolor, popup and
* popdown actions */
/* And add the entry pointing to the new menu */
gt_name = gettext("More&...");
gt_name = _("More&...");
name = fxstrdup(gt_name);
AddToMenu(
msp->menu, name, tempname,
Expand Down
6 changes: 3 additions & 3 deletions modules/FvwmScript/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ yyparse ()
#endif
#endif
{

int yystate;
int yyn;
int yyresult;
Expand Down Expand Up @@ -2482,7 +2482,7 @@ yyparse ()
case 5:
#line 402 "script.y"
{
FGettextInit("FvwmScript", LOCALEDIR, "FvwmScript");
FGettextInit("fvwm3", LOCALEDIR, "fvwm3");
FGettextSetLocalePath((yyvsp[(3) - (3)].str));
}
break;
Expand All @@ -2491,7 +2491,7 @@ yyparse ()
#line 407 "script.y"
{
fprintf(stderr,"UseGettext!\n");
FGettextInit("FvwmScript", LOCALEDIR, "FvwmScript");
FGettextInit("fvwm3", LOCALEDIR, "fvwm3");
}
break;

Expand Down
4 changes: 2 additions & 2 deletions modules/FvwmScript/script.y
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@ initvar: { InitVarGlob(); }
head:
| head USEGETTEXT GSTR
{
FGettextInit("FvwmScript", LOCALEDIR, "FvwmScript");
FGettextInit("fvwm3", LOCALEDIR, "fvwm3");
FGettextSetLocalePath($3);
}
| head USEGETTEXT
{
fprintf(stderr,"UseGettext!\n");
FGettextInit("FvwmScript", LOCALEDIR, "FvwmScript");
FGettextInit("fvwm3", LOCALEDIR, "fvwm3");
}
/* empty: we use default values */
| head WINDOWTITLE GSTR
Expand Down
Binary file removed po/FvwmScript.ar.gmo
Binary file not shown.
260 changes: 0 additions & 260 deletions po/FvwmScript.ar.po

This file was deleted.

Binary file removed po/FvwmScript.da.gmo
Binary file not shown.
Loading

0 comments on commit 63e56f7

Please sign in to comment.