summaryrefslogtreecommitdiffstats
path: root/install/po/Makefile.in
Commit message (Collapse)AuthorAgeFilesLines
* ticket 1669 - improve i18n docstring extractionJohn Dennis2011-08-241-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts the use of pygettext for i18n string extraction. It was originally introduced because the help documentation for commands are in the class docstring and module docstring. Docstrings are a Python construct whereby any string which immediately follows a class declaration, function/method declaration or appears first in a module is taken to be the documentation for that object. Python automatically assigns that string to the __doc__ variable associated with the object. Explicitly assigning to the __doc__ variable is equivalent and permitted. We mark strings in the source for i18n translation by embedding them in _() or ngettext(). Specialized extraction tools (e.g. xgettext) scan the source code looking for strings with those markers and extracts the string for inclusion in a translation catalog. It was mistakingly assumed one could not mark for translation Python docstrings. Since some docstrings are vital for our command help system some method had to be devised to extract docstrings for the translation catalog. pygettext has the ability to locate and extract docstrings and it was introduced to acquire the documentation for our commands located in module and class docstrings. However pygettext was too large a hammer for this task, it lacked any fined grained ability to extract only the docstrings we were interested in. In practice it extracted EVERY docstring in each file it was presented with. This caused a large number strings to be extracted for translation which had no reason to be translated, the string might have been internal code documentation never meant to be seen by users. Often the superfluous docstrings were long, complex and likely difficult to translate. This placed an unnecessary burden on our volunteer translators. Instead what is needed is some method to extract only those strings intended for translation. We already have such a mechanism and it is already widely used, namely wrapping strings intended for translation in calls to _() or _negettext(), i.e. marking a string for i18n translation. Thus the solution to the docstring translation problem is to mark the docstrings exactly as we have been doing, it only requires that instead of a bare Python docstring we instead assign the marked string to the __doc__ variable. Using the hypothetical class foo as an example. class foo(Command): ''' The foo command takes out the garbage. ''' Would become: class foo(Command): __doc__ = _('The foo command takes out the garbage.') But which docstrings need to be marked for translation? The makeapi tool knows how to iterate over every command in our public API. It was extended to validate every command's documentation and report if any documentation is missing or not marked for translation. That information was then used to identify each docstring in the code which needed to be transformed. In summary what this patch does is: * Remove the use of pygettext (modification to install/po/Makefile.in) * Replace every docstring with an explicit assignment to __doc__ where the rhs of the assignment is an i18n marking function. * Single line docstrings appearing in multi-line string literals (e.g. ''' or """) were replaced with single line string literals because the multi-line literals were introducing unnecessary whitespace and newlines in the string extracted for translation. For example: ''' The foo command takes out the garbage. ''' Would appear in the translation catalog as: "\n The foo command takes out the garbage.\n " The superfluous whitespace and newlines are confusing to translators and requires us to strip leading and trailing whitespace from the translation at run time. * Import statements were moved from below the docstring to above it. This was necessary because the i18n markers are imported functions and must be available before the the doc is parsed. Technically only the import of the i18n markers had to appear before the doc but stylistically it's better to keep all the imports together. * It was observed during the docstring editing process that the command documentation was inconsistent with respect to the use of periods to terminate a sentence. Some doc had a trailing period, others didn't. Consistency was enforced by adding a period to end of every docstring if one was missing.
* ticket 1650 - compute accurate translation statisticsJohn Dennis2011-08-181-11/+15
| | | | | | | | | | | | | | | | ticket 1650 (https://fedorahosted.org/freeipa/ticket/1650) has an extensive discussion of the issues, please refer to that. This patch does the following: * does not count fuzzy translations when computing translation statistics via the "msg-stats" make target in install/po * adds a new make target called "pull-po" which pulls updated po files from Transifex (configure.ac includes some trailing whitespace fixes) * turns off the generation of fuzzy translation suggestions during the message merge phase.
* transifex translation adjustmentJohn Dennis2011-08-121-1/+1
| | | | | | | | | | | | Pull the new translations for Spanish (es) and Ukrainian (uk) Update the LINGUAS file to add comment showing the friendly name for the language abbreviation. The make target msg-stats which produces a report about the state of the translations no longer maintained it's column alignment due to larger numbers so the formating was tweaked to maintain column alignment.
* Make dogtag an optional (and default un-) installed component in a replica.Rob Crittenden2011-06-231-0/+2
| | | | | | | | | | | | | | A dogtag replica file is created as usual. When the replica is installed dogtag is optional and not installed by default. Adding the --setup-ca option will configure it when the replica is installed. A new tool ipa-ca-install will configure dogtag if it wasn't configured when the replica was initially installed. This moves a fair bit of code out of ipa-replica-install into installutils and cainstance to avoid duplication. https://fedorahosted.org/freeipa/ticket/1251
* Connection check program for replica installationMartin Kosek2011-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When connection between a master machine and future replica is not sane, the replica installation may fail unexpectedly with inconvenient error messages. One common problem is misconfigured firewall. This patch adds a program ipa-replica-conncheck which tests the connection using the following procedure: 1) Execute the on-replica check testing the connection to master 2) Open required ports on local machine 3) Ask user to run the on-master part of the check OR run it automatically: a) kinit to master as default admin user with given password b) run the on-master part using ssh 4) When master part is executed, it checks connection back to the replica and prints the check result This program is run by ipa-replica-install as mandatory part. It can, however, be skipped using --skip-conncheck option. ipa-replica-install now requires password for admin user to run the command on remote master. https://fedorahosted.org/freeipa/ticket/1107
* Final i18n unit test fixes.Pavel Zuna2011-03-011-3/+4
|
* Use pygettext to generate translatable strings from plugin files.Pavel Zuna2011-03-011-1/+10
| | | | | | | | | | | | This patch replaces xgettext with a custom pygettext to generate translatable strings from plugin files in ipalib/plugins. pygettext was modified to handle plural forms (credit goes to Jan Hendrik Goellner) and had some bugs fixed by myself. We only use it for plugins, because it's the only place where we need to extract docstrings for the built-in help system. I also had to make some changes to the way the built-in documentation systems gets docstrings from modules for this to work.
* Remove radius options completely.Simo Sorce2011-01-141-1/+1
| | | | | | | This has been completely abandoned since ipa v1 and is not built by default. Instead of carrying dead weight, let's remove it for now. Fixes: https://fedorahosted.org/freeipa/ticket/761
* managed entry hostgroup netgroup support ↵Jr Aquino2010-12-131-0/+1
| | | | https://fedorahosted.org/freeipa/ticket/543
* Fix test.po errors in make testSimo Sorce2010-11-151-0/+1
| | | | Fixes: https://fedorahosted.org/freeipa/ticket/401
* Initial gettext support for C utilsSimo Sorce2010-10-121-126/+38
| | | | | | | | Add automatic creation of python an C file lists for potfiles Deletes useless copy of Makefile in install/po Remove duplicate maintainer-clean target Add debug target that prints file lists Unbreak update-po target, merges in patch from John
* I18N for webAdam Young2010-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Performing I18N completely on the server, to leverage the existing gettext architecture. Also, the browser does not have access to the Language header. Added the additional po files for a set of required languages conflict with install/static/ipa.js was resolved. Note that the addition of the .po files in this patch is necessary. In order to get Transifex support, we need to update the LINGUAS file with the languages for which we want support. If we don't add the .po files in, they get automatically generated by the rpmbuild process. Our implementation of gettext has a bug in it (It might be F13 thing) where the the Plurals line is not getting correctly transformed, which causes a build failure. However, since the RPM would have the .po files anyway, we should revision control the ones we have, even if they are empty. Fixed the Bug reporting url to the original value. Corrected the Chartype encoding for UK
* This patch removes the existing UI functionality, as a prep for adding the ↵Adam Young2010-07-291-4/+0
| | | | Javascript based ui.
* Add maintainer-clean targetRob Crittenden2010-06-241-0/+2
|
* Drop --with-openldap option in the client. This is no longer optional.Rob Crittenden2010-06-211-0/+3
|
* remove .pot target from Makefile.inJohn Dennis2010-03-161-3/+0
| | | | | | We want to manually make the .pot file, we shouldn't have anything in the Makefile which will cause the .pot file to be rebuilt because of dependencies.
* minor makefile cleanupJohn Dennis2010-02-221-2/+1
|
* fix i18n build problemJohn Dennis2010-02-221-2/+5
| | | | | | | | | | | | | | | There was a typo in install/po/Makefile.in which caused (some) of the .po files to be overwritten because the test to see if a po file existed had a typo in it. This patch also removes the unnecessary rebuilding of the pot which was happening when using the "all" target (the default). The pot file now must be manually remade, which is what we want. Added a new target "mo-files" to manually generate the .mo files. This is useful to run before checking in a new .po file just to assure it "compiles" and we don't have to discover this during a build.
* make update-pot will not touch pot file if msgid's are unmodifiedJohn Dennis2010-02-221-9/+16
| | | | | | | | | | | | | | | | | Formerly running 'make update-pot' would write an insignificantly different pot file even if the msgid's xgettext found were unmodfied. Now the result of running xgettext is compared to the existing pot file after adjusting for things like timestamps, and only copies the result of xgettext to the new pot file if there were differences. This will help eliminate git commits on the pot file if all one did was see if the pot file was up to date, if it was up to date git won't see any modifications. It used to be that timestamps would be different in the pot file just by virtue of checking if the pot file was current. fix exit status; replace POT with $(DOMAN).pot
* Add new Russian translation, update PolishJohn Dennis2010-02-221-1/+2
| | | | | | | | | | | | | | | Add new Russian translation. Update the Polish translation. Add count of how many po translations we have in msg-stats. Current translation statistics with this patch: ipa.pot has 133 messages. There are 5 po translation files. bn_IN: 14/133 10.5% 106 po untranslated, 13 missing, 119 untranslated id: 107/133 80.5% 13 po untranslated, 13 missing, 26 untranslated kn: 4/133 3.0% 116 po untranslated, 13 missing, 129 untranslated pl: 133/133 100.0% 0 po untranslated, 0 missing, 0 untranslated ru: 120/133 90.2% 0 po untranslated, 13 missing, 13 untranslated
* strip .po file suffix in translation statisticsJohn Dennis2010-02-191-3/+3
| | | | | | | | The goal is to get the statistics to line up in columns and not exceed an 80 character line which might cause wrapping. Removing .po suffix from the translation name gives us 3 extra characters. Formatting problems were observed when bn_IN.po was added.
* Add translation statisticsJohn Dennis2010-02-191-5/+26
| | | | | | | | | | | | | | The Makefile in install/po has a new target "msg-stats" which prints out statistics concerning the current pot and po files. Here is an example: % make msg-stats ipa.pot has 133 messages id.po: 107/133 80.5% 13 po untranslated, 13 missing, 26 untranslated kn.po: 4/133 3.0% 116 po untranslated, 13 missing, 129 untranslated pl.po: 120/133 90.2% 0 po untranslated, 13 missing, 13 untranslated Also update configure.ac to search for msgcmp, awk & sed programs.
* Pass target locale to msginitJohn Dennis2010-02-101-5/+35
| | | | | | | | | | | msginit should have been passed the locale because the resulting .po file is parameterized from the locale. Also, if the target locale is not specified it defaults to the current locale. If the target locale is Engish msgid's are copied to their msgstr's resulting in a fully translated .po instead of a fully untranslated .po. Add some comments to better explain some of the cryptic sed commands.
* Add i18n testJohn Dennis2010-02-101-1/+11
|
* Add support for building internationalized translations.John Dennis2010-02-091-0/+217
A new directory install/po has been added which contains all the translations for all files in IPA. The build has been agumented to build these files. Also the autogen.sh script was mostly replaced by autoreconf, the preferred method. The old autogen.sh sript also had some serious bugs in the way it compared versions which caused it to run old versions of some of the tools, using standared autoreconf is much better.