mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
120 stars 58 forks source link

Feature Request: Keep maintaining 'po4a-xxx' utilities #490

Open hwhsu1231 opened 3 months ago

hwhsu1231 commented 3 months ago

What I observe...

Hello, po4a maintenance team.

Recently, while using the latest version (v0.71) of po4a's po4a-updatepo, I encountered the following message:

po4a-updatepo is deprecated. The unified po4a(1) program is more convenient 
and less error prone. Once configured, `po4a --no-translations` can be used 
as a drop-in replacement to `po4a-updatepo`.

After briefly reviewing the documentation printed by po4a --help, if I'm not mistaken, using po4a requires providing a configuration file, right?

Usage:
    po4a [options] config_file

From the information above, I infer that po4a will eventually remove the po4a-xxx utilities and only keep the po4a command, correct?

What I hope/suggest...

If possible, I hope/suggest that po4a continues to provide:

A command-line tool that can handle a single master.doc without the need to create a configuration file.

In other words, I hope at least one of the following two requests can be implemented:

  1. Continue to maintain the po4a-xxx utilities. (Don't deprecate them)

  2. Provide a new mode of operation for the po4a command that does not require using a configuration file.

    For example, add some subcommands:

    • po4a translate <...> to replace po4a-translate <...>
    • po4a normalize <...> to replace po4a-normalize <...>
    • po4a updatepo <...> to replace po4a-updatepo <...>
    • po4a gettextize <...> to replace po4a-gettextize <...>

Why I hope/suggest...

In some situations, preparing a configuration file is quite cumbersome.

Taking the Gettext toolkit as an example.

Although commands like xgettext, msgcat, msgmerge, etc., can only process one po/pot file at a time, if users are familiar with a particular scripting language (For me, it's CMake), then they can use some kind of loop syntax to automatically process multiple po/pot files.

mquinson commented 1 month ago

I will try to fulfill this request.

Jibec commented 1 month ago

I think we have the same usecase in Fedora community, which forced us to stay stuck with po4a 0.66: https://pagure.io/fedora-docs/translations-scripts/issue/26

what we do: we parse thousands of pages, and based on source content in adoc, we generate pot files https://pagure.io/fedora-docs/translations-scripts/blob/master/f/src-to-pot.sh

then we have a translation platform for users to add translations the translation platform handles the po creation and updates each time a pot file changes then, we have a script that allows to generate source file from translations files: https://pagure.io/fedora-docs/translations-scripts/blob/master/f/po-to-src.sh

this is a huge machinery:

As far as I know, it is not possible to have a central file to handle such a complex usecase

jnavila commented 1 month ago

This would have the added benefit of allowing to run po4a processes in parallel on multicore machines.

eevan78 commented 3 weeks ago

I have similar problem, translating the complete Vim documentation to single language. I have setup the config file that I use to update the translation from time to time. That works fine. During translation process, I have been using po4a-translate to translate just the file I'm working on and display the result. I have tried to do the same using po4a with --no-update and --translate-only filename options, but I get

Split mode, creating a temporary POT:Disabling --translate-only option, it is not supported in split mode

That way it is very slow as it translates all files, and there are 152 of them. It seems that there are use cases which cannot be substituted easily with po4a...