mquinson / po4a

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

pot= parameter not working #341

Closed boydkelly closed 2 years ago

boydkelly commented 2 years ago

Sorry if this is simply a misconfiguration on my part. I have tried the config as described in the man page producing separate pot and po files for each master file and using the pot= parameter to avoid name conflicts.

My config is as follows:

[po4a_langs] fr                                                                                                                                    
[po4a_paths] l10n/pot/en/$master.pot $lang:l10n/po/$lang/$master.po         

[type: asciidoc] docs/en/modules/slides/nav.adoc $lang:docs/$lang/modules/slides/nav.adoc pot=slides 

But when I run po4a i get an errror message:

en.cfg:34: Unparsable argument 'pot=slides' ([type: asciidoc] docs/en/modules/slides/nav.adoc $lang:docs/$lang/modules/slides/nav.adoc pot=slides).

I have also tried [type: asciidoc] docs/en/modules/slides/nav.adoc $lang:docs/$lang/modules/slides/nav.adoc opt: "pot=slides" and this doesn't produce an error message, but does not produce differentiated files for nav.adoc

Did I get something wrong here? Thanks!!

mquinson commented 2 years ago

Well, I'm not sure because it works in our tests: https://github.com/mquinson/po4a/blob/master/t/cfg/split-multimaster/po4a.conf which is actually run each time: https://github.com/mquinson/po4a/runs/4525706855?check_suite_focus=true#step:6:2641

This option is processed in po4a(1), not in the format modules, so I'd be surprised if it would work for man in our test and not for asciidoc in yours. Nothing is impossible, but I really doubt it.

So, I think I'll need a minimal working example of the breakage, or maybe an access to the full project on which you are experiencing this difficulty.

Cheers,

boydkelly commented 2 years ago

ok Thank you! I have included a simple project with one file at:

https://gitlab.com/boydkelly/po4a_test.git

[bkelly@penguin translate]$ po4a en.cfg en.cfg:6: Unparsable argument 'pot=blog' ([type: asciidoc] content/en/proverb.adoc $lang:content/$lang/proverb.adoc pot=blog).

mquinson commented 2 years ago

Well. pot= was introduced in v0.65, so it's not working in v0.64 that you seem to have.

Thanks for this very good working example, digging into your problem was made really easy.

mquinson commented 2 years ago

I'm closing the bug, but please feel free to reopen if the problem remains with v0.65.