|
Ran
|
Jobs
3
|
Files
1150
|
Run time
3min
|
Badge
README BADGES
|
push
github
[SLE-16] Fixed creating the web/agama.pot file (bsc#1248817) (#2692) ## Problem - https://bugzilla.suse.com/show_bug.cgi?id=1248817 - Some translated texts are missing in the generated POT file ## Details The problem is with plural texts which have arguments placed on multiple lines. Example: ```js n_( "The following partition will be created.", "The following partitions will be created.", num, ); ``` It turned out that the problem is caused by the trailing comma after the last argument. After removing the trailing comma the texts are extracted to the POT file correctly. ## Solution The script which calls `xgettext` to extract the translatable string into the POT file uses the `--keyword=n_:1,2,3t` option. That tells the xgettext parser to consider the `n_()` function as a gettext call function. The problem is that the `3t` option tells xgettext to extract the texts only if the `n_()` call has exactly 3 parameters. With that additional trailing comma the call has technically 4 parameters, even though the 4th argument is not defined. From the [xgettext documentation](https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html): > If *keywordspec* is of the form *‘id:…,totalnumargst’*, xgettext recognizes this argument specification only if the number of actual arguments is equal to *totalnumargs*. ## Notes - Actually I copied these `xgettext` options from the [Cockpit xgettext invocation](https://github.com/cockpit-project/cockpit/blob/c4e1cd89b/po/Makefile.am#L13). They need it to distinguish the plural form from the plural form with context which uses 4 arguments. We do not support contexts so we do not have to care about the number of arguments. - Additionally the script ignores the `po-converter.js` file which is used for converting the *.po files to target *.js files. It does not contain any translatable texts and it not included in the built Agama files, but the xgettext parser i... (continued)
2228 of 3993 branches covered (55.8%)
Branch coverage included in aggregate %.
25306 of 38836 relevant lines covered (65.16%)
50.47 hits per line
| ID | Flag name | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|---|
| 3 | web | 17383261552.3 | 574 |
68.62 |
GitHub Action Run | |
| 3 | service | 17265242806.3 | 390 |
88.51 |
GitHub Action Run | |
| 1 | rust | 17294966794.1 | 186 |
21.98 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|