Skip to content

Commit

Permalink
Ignorable bookinfo.xml, qaxml.t
Browse files Browse the repository at this point in the history
  • Loading branch information
André L F S Bacci committed Nov 6, 2024
1 parent 747c53b commit a2f73fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
35 changes: 17 additions & 18 deletions scripts/translation/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Useful scripts for maintaining translation consistency of manual

Some of these scripts only test some file contents or XML structure
Expand All @@ -6,12 +7,13 @@ Others will try to modify the translations in place, changing the
translated files. Use with care.

Not all translations are identical, or use the same conventions.
So not all scripts will be of use for all translations. The
assumptions of each script are described in each file.
Even two translators working on one language may havedifferent
opinions on how much synchronization is wanted. So not all scripts
will be of use for all translations.

It's also possible to silence each alert indempendly. These scripts
will output `--add-ignore` commands that, if executed, will omit
the specific warming in future executions.
Because of aboce, it's possible to silence each alert indempendly.
These scripts will output `--add-ignore` commands that, if executed,
will omit the specific warming in future executions.

The `lib/` directory contains common code and functionality
across these scripts.
Expand All @@ -32,18 +34,18 @@ expected format.
the same tag-attribute-value triplets. Tag's attributes are extensively
utilized in manual for linking and XIncluding. Translated files with
missing or mistyped attributes may cause build failing or missing
parts not copied by XIncludes.
parts, not copied by XIncludes.

## qaxml.e.php

`qaxml.e.php` checks if all updated translated files have
the same external entities as the original files. Unbalanced entities
may indicate mistyped or wrongly traduced parts.
may indicate mistyped or wrongly translated parts.

## qaxml.p.php

`qaxml.p.php` checks if all updated translated files have
the same processing instructions as the original files. Unbalanced entities
the same processing instructions as the original files. Unbalanced PIs
may cause compilation errors, as they are utilized in the manual build
process.

Expand Down Expand Up @@ -74,6 +76,7 @@ php doc-base/scripts/translation/qaxml.a.php
php doc-base/scripts/translation/qaxml.e.php
php doc-base/scripts/translation/qaxml.p.php
php doc-base/scripts/translation/qaxml.t.php
php doc-base/scripts/translation/qaxml.w.php
```
Tags where is expected no translations:
```
Expand Down Expand Up @@ -101,15 +104,11 @@ php doc-base/scripts/translation/qaxml.t.php literal
php doc-base/scripts/translation/qaxml.t.php varname
```

# Migration

## Maintainers with spaces

The regex on `RevtagParser` is narrowed to not accept maintainer names
with spaces. This needs to be confirmed on all active translations, or
the regex modified to accept spaces again.
## Initial alerts execution

## en/chmonly
The first execution of these scripts may generate an inordinate amount of
alerts. It's advised to initially run each command separately, and work the
alerts on a case by case basis. After all interesting cases are observed,
it's possible to rerun the command, and `grep` the output for `--add-ignore`
lines, and to mass ignore the residual alerts.

`en/chmonly` is ignored on revcheck, but it appears translatable. If it's a
`en/` only directory, this should be uncommented on RevcheckIgnore.
2 changes: 0 additions & 2 deletions scripts/translation/qaxml.e.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

foreach ( $qalist as $qafile )
{
if ( $qafile->file == "bookinfo.xml" )
continue;
if ( $qafile->sourceHash != $qafile->targetHash )
continue;

Expand Down
2 changes: 0 additions & 2 deletions scripts/translation/qaxml.t.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@

foreach ( $qalist as $qafile )
{
if ( $qafile->file == "bookinfo.xml" )
continue;
if ( $qafile->sourceHash != $qafile->targetHash )
continue;

Expand Down

0 comments on commit a2f73fb

Please sign in to comment.