|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| .github/workflows/ | H | 14-Nov-2021 | - | 41 | 33 |
| doc/ | H | 14-Nov-2021 | - | 927 | 633 |
| lib/Locale/Po4a/ | H | 14-Nov-2021 | - | 20,348 | 11,077 |
| po/ | H | 14-Nov-2021 | - | 305,943 | 266,627 |
| scripts/ | H | 14-Nov-2021 | - | 401 | 203 |
| share/doc/ | H | 14-Nov-2021 | - | 167 | 144 |
| t/ | H | 14-Nov-2021 | - | 41,058 | 33,056 |
| testsuite/ | H | 14-Nov-2021 | - | 437 | 365 |
| .appveyor.yml | H A D | 14-Nov-2021 | 1.2 KiB | 45 | 35 |
| .gitignore | H A D | 14-Nov-2021 | 73 | 9 | 9 |
| .mailmap | H A D | 14-Nov-2021 | 707 | 16 | 15 |
| .tidyallrc | H A D | 14-Nov-2021 | 186 | 6 | 5 |
| .travis.yml | H A D | 14-Nov-2021 | 805 | 42 | 37 |
| .weblate | H A D | 14-Nov-2021 | 72 | 4 | 3 |
| Build.PL | H A D | 14-Nov-2021 | 1.9 KiB | 43 | 29 |
| CONTRIBUTING.md | H A D | 14-Nov-2021 | 11.9 KiB | 319 | 263 |
| COPYING | H A D | 14-Nov-2021 | 17.6 KiB | 342 | 282 |
| MANIFEST | H A D | 14-Nov-2021 | 33 KiB | 1,156 | 1,152 |
| MANIFEST.SKIP | H A D | 14-Nov-2021 | 558 | 41 | 35 |
| META.json | H A D | 14-Nov-2021 | 3.6 KiB | 135 | 134 |
| NEWS | H A D | 14-Nov-2021 | 59.5 KiB | 1,699 | 1,376 |
| Po4aBuilder.pm | H A D | 03-May-2022 | 12 KiB | 334 | 281 |
| README.maintainers | H A D | 14-Nov-2021 | 4 KiB | 134 | 100 |
| README.md | H A D | 14-Nov-2021 | 4.3 KiB | 138 | 98 |
| TODO | H A D | 14-Nov-2021 | 1.8 KiB | 60 | 46 |
| changelog | H A D | 14-Nov-2021 | 165.2 KiB | 4,252 | 3,215 |
| fix_perms.sh | H A D | 14-Nov-2021 | 313 | 10 | 5 |
| msguntypot | H A D | 14-Nov-2021 | 6.3 KiB | 238 | 95 |
| po4a | H A D | 14-Nov-2021 | 77.8 KiB | 1,992 | 1,075 |
| po4a-gettextize | H A D | 14-Nov-2021 | 15.3 KiB | 434 | 84 |
| po4a-normalize | H A D | 14-Nov-2021 | 5.5 KiB | 208 | 85 |
| po4a-translate | H A D | 14-Nov-2021 | 10.1 KiB | 334 | 125 |
| po4a-updatepo | H A D | 14-Nov-2021 | 9.6 KiB | 323 | 117 |
README.maintainers
1This document provides some general rules to deploy a translation process
2that will ease the work of maintainers (upstream and distribution
3maintainers) and translators (or translation teams).
4
5
6Translators usually fetch a POT (for a new translation) or retrieve the current
7PO for their language, then they translate the untranslated strings and
8update the translation of the strings marked as fuzzy.
9
10
11Updating files
12--------------
13
14Translators need to know if a PO has to be updated:
15 * they can verify the POs in the version control system or in the
16 distributed archives/packages
17 * they can be informed by the translation teams, which automatically
18 check the status of the POs in various packages.
19We want to avoid translators to be notified by a user reporting that
20some strings are not translated even if the PO contains neither untranslated nor
21fuzzy string.
22
23
24Thus it is important to ensure that the POTs are up-to-date with the
25original documents and that the POs contain the same strings as the
26POTs.
27
28 1. Upstream maintainers should update the POTs according to the original
29 documents and update the POs according to these up-to-date POTs when they
30 distribute an archive.
31
32 2. If the switch to po4a was done in a distribution, the source package
33 should also contain up-to-date translation materials.
34
35 3. If the documentation is patched by the distribution, the maintainer
36 must not forget to update the POTs and POs.
37
38It is important to ensure that the translation materials are updated
39automatically.
40
41
42Architecture
43------------
44
45A standardized architecture of the source tree will help the translation
46teams when they try to detect the POTs that need to be updated.
47
48Thus we recommend the following architecture:
49
50 /
51 /doc/
52 /doc/en/
53 /doc/en/
54 /doc/po4a/
55 /doc/po4a/add_<ll>/
56 /doc/po4a/po4a.cfg
57 /doc/po4a/po/
58 /doc/po4a/po/<pkg>.pot
59 /doc/po4a/po/<ll>.po
60 /doc/translated/<ll>/
61
62Or, if you want to avoid a big POT and split it according to the packages,
63documents, formats, or subjects, you can use the following architecture:
64
65 /
66 /doc/
67 /doc/en/
68 /doc/en/
69 /doc/po4a/
70 /doc/po4a/add_<ll>/
71 /doc/po4a/<pkg1>/po4a.cfg
72 /doc/po4a/<pkg1>/po/
73 /doc/po4a/<pkg1>/po/<pkg1>.pot
74 /doc/po4a/<pkg1>/po/<ll>.po
75 /doc/translated/<ll>/
76
77
78It is important to avoid a build failure if a generated
79translation cannot be generated (the PO is too outdated, an addendum
80cannot be applied, etc.). You should therefore use wildcards or test if the file
81was generated in the 'install' or 'dist' rules
82
83
84Examples
85========
86
87Using po4a upstream
88-------------------
89When po4a is used upstream, we recommend to run po4a in the 'dist' rule.
90This will update the POT and POs, and will generate the translated documents.
91These translated documents can be distributed in the source archive if the
92maintainer don't want to add a build dependency on po4a. You should then
93add an autoconf check on po4a. It will allow you to update the documentation
94if po4a is available on your system. If po4a is not available, documents
95will be distributed without being synced with the original version, but the
96build process won't fail.
97
98It is important to distribute the POT and POs in the source archive.
99
100A typical dist rule could then be:
101
102dist:
103 po4a <package>.cfg
104 ...
105
106If automake is used, the following could also be used.
107
108dist-hook:
109 po4a <package>.cfg
110 ...
111
112
113Using po4a in a distribution
114----------------------------
115(Debian packaging is taken as an example, you will have to adapt this to
116your distribution)
117To ensure that the source of a Debian package contains only up-to-date POT
118and POs, you should run po4a in the 'clean' rule
119of debian/rules. The translated documents can be generated in the 'build'
120(or 'build-indep') rule:
121
122clean:
123 # Update the POT and POs
124 cd <...>/po4a && po4a --no-translations <package>.cfg
125 # Delete translated documentation
126 rm -rf <...>/translated
127
128build:
129 # Generate the translations
130 cd <...>/po4a && po4a <package>.cfg
131
132However, you should try to avoid distribution-specific build systems, to
133ensure the portability of your software.
134
README.md
1# Introduction to Po4a
2
3[![Build Status](https://travis-ci.org/mquinson/po4a.svg?branch=master)](https://travis-ci.org/mquinson/po4a)
4[![First Timers Friendly](https://img.shields.io/badge/Beginners-Welcome-brightgreen.svg?style=flat-square)](http://www.firsttimersonly.com)
5
6The goal of po4a (PO for anything) project is to ease translations (and
7more interestingly, the maintenance of translations) using gettext
8tools on areas where they were not expected like documentation.
9
10In po4a each documentation format is handled by a module. Presently, we have a
11module for the following formats:
12
13 - asciidoc: AsciiDoc format.
14 - dia: uncompressed Dia diagrams.
15 - docbook: DocBook XML.
16 - guide: Gentoo Linux's XML documentation format.
17 - halibut: Simon Tatham's documentation production system.
18 - ini: INI format.
19 - kernelhelp: Help messages of each kernel compilation option.
20 - latex: LaTeX format.
21 - bibtex: bibtex format.
22 - man: Good old manual page format.
23 - pod: Perl Online Documentation format.
24 - sgml: either DebianDoc or DocBook DTD.
25 - texinfo: The info page format.
26 - tex: generic TeX documents (see also latex).
27 - text: simple text document.
28 - wml: WML documents.
29 - xhtml: XHTML documents.
30 - xml: generic XML documents (see also docbook).
31 - yaml: YAML documents.
32 - rubydoc: RubyDoc (RD) documents.
33
34# Installation
35
36To install this module type the following:
37
38```
39 perl Build.PL
40 ./Build
41 ./Build install
42```
43
44# Contributing
45
46po4a is particularly welcoming contributions from the community. If
47you are new to Open Source, we'd love to mentor you for your first
48contributions. Please see the
49[CONTRIBUTING](https://github.com/mquinson/po4a/blob/master/CONTRIBUTING.md)
50file to see how you could help.
51
52# Use without installation
53
54If you want to use a version without installing it (e.g. directly from
55the git tree), use the PERLLIB environment variable as such:
56
57```
58 PERLLIB=~/git-checkouts/po4a/lib ~/git-checkouts/po4a/po4a-gettextize [usual args]
59```
60
61# Po4a dependencies
62
63* Locale::gettext (v1.01)
64
65 This module being itself internationalized, it needs the Locale::gettext
66 library to translate its own messages.
67 If it is not present, then po4a's messages won't be translated, but
68 po4a will remain fully functional.
69
70* Text::WrapI18N
71
72 This module is used to format po4a's warnings and error messages. It
73 permits to wrap long error messages without splitting words.
74 If it is not present, the formatting of messages will be different,
75 but po4a will remain fully functional.
76
77* Term::ReadKey
78
79 This module is used to retrieve the terminal's line width. It is not
80 used if Text::WrapI18N is not available.
81 If it is not present, the line width can be specified with the COLUMN
82 environment variable.
83
84
85## SGML module specific dependencies
86
87* SGMLS (1.03ii)
88
89 This is a set of Perl5 routines for processing the output from the onsgmls
90 SGML parser.
91
92* opensp (1.5.2) OpenJade group's SGML parsing tools
93
94 This is the SGML parser we use.
95
96* docbook: used in the tests. Without this package, the test fails with:
97 ```
98 onsgmls:<OSFD>0:1:59:W: cannot generate system identifier for public text "-//OASIS//DTD DocBook V4.1//EN"
99 onsgmls:<OSFD>0:6:0:E: reference to entity "REFENTRY" for which no system identifier could be generated
100 onsgmls:<OSFD>0:1:0: entity was defined here
101 onsgmls:<OSFD>0:6:0:E: DTD did not contain element declaration for document type name
102 po4a::sgml: Error while running onsgmls -p. Please check if onsgmls and the DTD are installed.
103 ```
104 You don't need it if you don't want to run the tests.
105
106## Text module specific dependencies
107
108* Unicode::GCString
109
110 This module is used to compute text width; it is needed by AsciiDoc to
111 determine two line titles in encodings different from ASCII.
112 https://github.com/hatukanezumi/Unicode-LineBreak
113
114
115## YAML module specific dependencies
116
117* YAML::Tiny
118
119 This module is used to parse and serialize the YAML file.
120
121# Project hosting
122
123 - Webpage: https://po4a.org
124 - Source code: https://github.com/mquinson/po4a
125 - Bug tracker: https://github.com/mquinson/po4a/issues
126 - Source of the web pages: https://github.com/mquinson/po4a-website
127
128# Copyright and license
129
130This program is free software; you may redistribute it and/or modify it
131under the terms of GPL (see COPYING file).
132
133Copyright © 2002-2O18 by SPI, inc.
134
135Authors:
136- Denis Barbier <barbier@linuxfr.org>
137- Martin Quinson (mquinson#debian.org)
138