Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nomerge] enhance debug output, fix docbook behavior, allow separate input for POT #148

Closed
wants to merge 23 commits into from

Conversation

osamuaoki
Copy link
Contributor

Sorry for my old patch containing version.

Here is my tentative work to address several issues. docbook behavior change is based on tarball test posted to #76 .

These are important to allow translator data addition.

With this debug outputs, we see what are we matching against for addendum. Also actual tag property setting can be seen.

I cherry picked new changes in master so it is cleanly merged.

TODO:

  • Separate POT input via pot_in needs test case for po4a/po4a.conf.
  • My tarball test needs to be adopted into test framework

osamuaoki and others added 13 commits September 24, 2018 08:26
Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
Matching for addendum is not always against "line".

<title> is separate data string for DocBook XML which should be more likely
than SGML

Signed-off-by: Osamu Aoki <osamu@debian.org>
The $VERSION variable is the version of the whole PO4A software, there is no point to change it here.
Signed-off-by: Osamu Aoki <osamu@debian.org>
Add new section
  OVERRIDE THE DEFAULT BEHAVIOR WITH COMMAND LINE OPTIONS
with example.

Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
@mquinson
Copy link
Owner

Could you consider adding the tests to the pull request directly, please?

Thx

* One line code addition to normalize array items

Split array item on each internal "\n" while keeping it with the lookbehind
trick.

This doesn't cause problem for man page handling and allow us not keep original
default values for Docbook module.

* Documentation updates and correction

 For $self->{TT}{doc_in}=()  "[2] the type" is incorrect

Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
@osamuaoki
Copy link
Contributor Author

Changing tag type is certainly a workaround. But I think that is not the safest and robust way to address addendum problem. Give me some time to learn test code writing ... No need to merge yet

@mquinson mquinson changed the title enhance debug output, fix docbook behavior, allow separate input for POT [nomerge] enhance debug output, fix docbook behavior, allow separate input for POT Oct 13, 2018
@mquinson
Copy link
Owner

Hello @osamuaoki , please take your time, your work is really welcome.

Signed-off-by: Osamu Aoki <osamu@debian.org>
Signed-off-by: Osamu Aoki <osamu@debian.org>
Perl's one dimensional array creates big barrier for non-perl users to read
code.

Signed-off-by: Osamu Aoki <osamu@debian.org>
tags in untranslated tag list don't take W nor w translation option
since these are only valid for translated tags

Signed-off-by: Osamu Aoki <osamu@debian.org>
 * Docbook article.xml example
   * Japanese PO handling
   * Addendum into articleinfo
 * Docbook book.xml example
   * Japanese PO handling
   * Addendum into bookinfo
   * comment in translated paragraph
   * option to change tag property
 * Docbook book-auto.xml example
   * Support of pot_in:<filepath_to_master.xml_for_POT>
   * Verify static PO for auto content addition to master.xml_for_output

Signed-off-by: Osamu Aoki <osamu@debian.org>
@osamuaoki
Copy link
Contributor Author

Hi,

I finally got test case for DocBook added.
Addendum issue is fixed without problem by adding one line ;-)

@{$self->{TT}{doc_out}} = map { split /(?<=\n)/, $_ } @{$self->{TT}{doc_out}};

Although, tweaking tag behavior solved issue for my upload of Debian History, this is not the approach we want to use for releasing po4a since it may cause other regression.

So I decided Document work around in manpage.

Also, tracing code was not easy since debug output was not organized. I have added extensive debug output for easier future debug.
This solves issues discussed at:

@osamuaoki
Copy link
Contributor Author

I think code is practically ready to be merged. One thing you may want to check is I left generated file in the t/t-02-addendums directory for easy review. But if you want cleaner build tree, move them to tmp/.

That's all.

@osamuaoki osamuaoki closed this Oct 15, 2018
@osamuaoki osamuaoki deleted the master branch October 15, 2018 14:52
@osamuaoki
Copy link
Contributor Author

I cleaned up history for easier review.

(i know its bad idea usually but ... it was ugly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants