• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H14-Nov-2021-4133

doc/H14-Nov-2021-927633

lib/Locale/Po4a/H14-Nov-2021-20,34811,077

po/H14-Nov-2021-305,943266,627

scripts/H14-Nov-2021-401203

share/doc/H14-Nov-2021-167144

t/H14-Nov-2021-41,05833,056

testsuite/H14-Nov-2021-437365

.appveyor.ymlH A D14-Nov-20211.2 KiB4535

.gitignoreH A D14-Nov-202173 99

.mailmapH A D14-Nov-2021707 1615

.tidyallrcH A D14-Nov-2021186 65

.travis.ymlH A D14-Nov-2021805 4237

.weblateH A D14-Nov-202172 43

Build.PLH A D14-Nov-20211.9 KiB4329

CONTRIBUTING.mdH A D14-Nov-202111.9 KiB319263

COPYINGH A D14-Nov-202117.6 KiB342282

MANIFESTH A D14-Nov-202133 KiB1,1561,152

MANIFEST.SKIPH A D14-Nov-2021558 4135

META.jsonH A D14-Nov-20213.6 KiB135134

NEWSH A D14-Nov-202159.5 KiB1,6991,376

Po4aBuilder.pmH A D03-May-202212 KiB334281

README.maintainersH A D14-Nov-20214 KiB134100

README.mdH A D14-Nov-20214.3 KiB13898

TODOH A D14-Nov-20211.8 KiB6046

changelogH A D14-Nov-2021165.2 KiB4,2523,215

fix_perms.shH A D14-Nov-2021313 105

msguntypotH A D14-Nov-20216.3 KiB23895

po4aH A D14-Nov-202177.8 KiB1,9921,075

po4a-gettextizeH A D14-Nov-202115.3 KiB43484

po4a-normalizeH A D14-Nov-20215.5 KiB20885

po4a-translateH A D14-Nov-202110.1 KiB334125

po4a-updatepoH A D14-Nov-20219.6 KiB323117

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