Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: tags/R-2-14-2

This branch is 457 commits ahead, 7726 commits behind trunk

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
LINGUAS
Makefile.in.in
Makefile.win
Makevars
POTFILES.in
R.pot
README
RGui-da.gmo
RGui-da.po
RGui-de.gmo
RGui-de.po
RGui-es.gmo
RGui-es.po
RGui-fr.gmo
RGui-fr.po
RGui-it.gmo
RGui-it.po
RGui-ja.gmo
RGui-ja.po
RGui-ko.gmo
RGui-ko.po
RGui-nn.gmo
RGui-nn.po
RGui-pt_BR.gmo
RGui-pt_BR.po
RGui-ru.gmo
RGui-ru.po
RGui-tr.gmo
RGui-tr.po
RGui-zh_CN.gmo
RGui-zh_CN.po
RGui-zh_TW.gmo
RGui-zh_TW.po
RGui.pot
Rules-quot
THANKS
boldquot.sed
de.gmo
de.po
en.gmo
en.po
en@boldquot.header
en@quot.gmo
en@quot.header
en@quot.po
en_GB.gmo
en_GB.po
es.gmo
es.po
fr.gmo
fr.po
insert-header.sin
it.gmo
it.po
ja.gmo
ja.po
ko.gmo
ko.po
nn.gmo
nn.po
pt_BR.gmo
pt_BR.po
quot.sed
remove-potcdate.sin
ru.gmo
ru.po
tr.gmo
tr.po
zh_CN.gmo
zh_CN.po
zh_TW.gmo
zh_TW.po

README

The Makefile.in.in here was originally produced by gettextize, but has
since been modified extensively.

If you convert a C file for use with gettext, add it to POTFILES.in and
then run

	make update-po

to recreate R.pot and update the automated `translations'.

Target

	make update-pkg-po

updates the message catalogs for the C and R code in the standard packages,
uses msgmerge --update to update the translations and then re-makes the
compiled (.mo) files.

To do this for an individual standard package use

	make pkg-update PKG=<pkgname>

If you add a package, R-level catalogs are produced automatically but
for a C-level catalog you need to touch path/to/package/po/package.pot.

To add a new translation, add the lang.po file to this directory and
add the language to LINGUAS.  If there are no problems with the
translations 'make all R' (in the builddir, if separate) will do the
rest (create ll.gmo and install it as required).  For fuller manual
control, use

	msgfmt -c --statistics -o ll.gmo ll.po

to check and compile the translation, and

	mkdir R_BUILD_DIR/share/locale/ll/LC_MESSAGES
	cp ll.gmo R_BUILD_DIR/share/locale/ll/LC_MESSAGES/R.mo

to install it manually for testing.

An R-core member, after fixing a translation file, e.g.,
   	../src/library/<pkg>/po/R-<ll>.po
needs to use msgfmt as above, e.g., inside the <pkg>/po/ directory,
        msgfmt -c --statistics -o R-<ll>.gmo R-<ll>.po
and     mv R-<ll>.gmo ../inst/po/<ll>/LC_MESSAGES/R-tools.mo



Windows RGui translations
=========================

These are contained in RGui.pot, created by running 'make RGui.pot-update'.

Translations should be called RGui-ll.po for language 'll': such a file is
compiled by

	msgfmt -c --statistics -o RGui-ll.gmo RGui-ll.po

To add a translation, add both the .po and .gmo files to the
RGUI-CATALOGS macro in Makefile.in.in: it will then be automatically
distributed.

To test a translation on Windows, use

	cp RGui-ll.gmo ../share/locale/ll/LC_MESSAGES/RGui.mo

and then startup RGui.exe in an appropriate locale, or set LANGUAGE=ll
on the command line.  (All RGui-*.gmo files will installed to the
right places when 'make -f Makefile.win' is run in this directory,
which is part of the main 'make' process.)

To re-make RGui.pot and all the translations use 'make update-RGui'.


Adding translations to other packages
=====================================

To create the .pot files for a package PKG with absolute path PKGDIR, use

   mkdir ${PKGDIR}/po

and (only) if there are marked translations in the C source code

    touch ${PKGDIR}/po/${PKG}.pot

Then run from this directory

     make pkg-update PKG=${PKG} PKGDIR=${PKGDIR}

This will create ${PKGDIR}/po/R-${PKG}.pot, and update
${PKGDIR}/po/${PKG}.pot if it already exists.  It will then create
en@quot translations and install them.

Running the same make command at a later stage will update the
template files, and update and install any new translations that have
been added in ${PKGDIR}/po.


Note to Mac OS X users
======================

NB: these commands did not run correctly on at least one Mac OS X
installation.  There were problems with the sed scripts used for the
en@quot translations (in how \n was handled).
Something went wrong with that request. Please try again.