i18nspector(1)
๐ธ i18nspector ๐ธ
okay so bestie, welcome to the i18nspector(1) page from your General Commands Manual โ it's the gettext-checking tool and honestly it's kind of a big deal ๐
โจ SYNOPSIS โจ
i18nspector [options] file [file โฆ]
๐ DESCRIPTION ๐
i18nspector is that girl who checks your translation templates (POT), your message catalogues (PO) and your compiled message catalogues (MO) files for common problems. no cap, she will find the mess ๐
these files are used by the GNU gettext translation functions and tools across so many different development environments โ like, everywhere. she's the vibe check your localization pipeline has been begging for ๐ฆ
๐ OPTIONS ๐
-l lang,--language langโ assume this language, bestie.langshould be a 2- or 3-letter ISO 639 language code, and it can also have an underscore plus a 2-letter ISO 3166 territory code tacked on the end ๐--unpack-debโ allow unpacking Debian (binary or source) packages. yes, she'll crack those open for you ๐-j n,--jobs nโ usenprocesses in parallel.ncan be a positive integer, orautoto determine the number automatically โจ the default is to use only a single process (she's lowkey chill like that)-h,--helpโ show help message and exit ๐ซถ--versionโ show version information and exit โญ
๐ OUTPUT FORMAT ๐
every single reported problem uses this format, no exceptions:
code: file: tag [extra]
and here's the breakdown, because we love a legend:
codeis a letter indicating the type of the message:E(error),W(warning),I(informative message), orP(pedantic message) ๐tagis a name of the problem that was discovered ๐extracan contain additional information about the problem ๐ฌ
๐ท๏ธ TAGS ๐ท๏ธ
this is the main character section, fr fr. every tag, every detail, every severity. buckle up ๐ง
ancient-date
the date refers to the time before the first GNU gettext release. as such, it's extremely unlikely to be correct ๐ญ
References:
Severity, certainty: normal, certain
arithmetic-error-in-plural-forms
computing a plural form value triggers division by zero or integer overflow. this normally indicates an error in the plural form expression ๐
References:
Severity, certainty: serious, possible
arithmetic-error-in-unused-plural-forms
computing a plural form value triggers division by zero or integer overflow. (but there are no translated messages which use plural forms.) this normally indicates an error in the plural form expression ๐
References:
Severity, certainty: normal, possible
boilerplate-in-content-type
the Content-Type header field contains xgettext boilerplate. it should be in the form text/plain; charset=encoding ๐
References:
<https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#index-encoding-of-PO-files>
Severity, certainty: important, certain
boilerplate-in-date
the date header field contains xgettext boilerplate. the date format should be YYYY-MM-DD hh:mm+ZZzz, e.g. 2011-11-05 10:14+0100 โจ
Severity, certainty: normal, certain
boilerplate-in-initial-comments
the initial comments contain xgettext or msginit boilerplate ๐ซถ
References:
Severity, certainty: minor, possible
boilerplate-in-language-team
the Language-Team header field contains xgettext boilerplate. it should contain English name of the language, and the email address or homepage URL of the language team ๐
References:
Severity, certainty: minor, certain
boilerplate-in-last-translator
the Last-Translator header field contains xgettext boilerplate. it should contain the last translator's name and email address ๐ธ
References:
Severity, certainty: normal, certain
boilerplate-in-project-id-version
the Project-Id-Version header field contains xgettext boilerplate. it should contain the name and the version of the package ๐ฆ
References:
Severity, certainty: minor, certain
boilerplate-in-report-msgid-bugs-to
the Report-Msgid-Bugs-To header field contains xgettext boilerplate. it should contain an email address or URL where one can report bugs in the untranslated strings ๐
References:
Severity, certainty: normal, certain
broken-encoding
header fields and messages contained by this file couldn't be decoded to Unicode. the usual cause of this is incorrect or missing encoding declaration ๐ต๐ซ
note that in the absence of encoding declaration, i18nspector assumes ASCII encoding.
References:
<https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#index-encoding-of-PO-files><https://www.rfc-editor.org/rfc/rfc2045.html#section-5>
Severity, certainty: serious, possible
c-format-string-argument-type-mismatch
there's a type mismatch between a C format argument in msgid and the corresponding format argument in msgid_plural; or between a C format argument in msgstr and msgid; or between a C format argument in msgstr[N] and corresponding msgid or msgid_plural ๐
References:
Severity, certainty: serious, possible
c-format-string-error
a C format string could not be parsed. she literally could not read it ๐ญ
References:
Severity, certainty: serious, possible
c-format-string-excess-arguments
a C format string for msgid consumes more arguments than msgid_plural; or msgstr consumes more arguments than msgid; or msgstr[N] consumes more arguments than corresponding msgid or msgid_plural ๐ฅ
References:
Severity, certainty: serious, possible
c-format-string-missing-arguments
a C format string for msgid consumes fewer arguments than msgid_plural; or msgstr consumes fewer arguments than msgid; or msgstr[N] consumes fewer arguments than corresponding msgid or msgid_plural ๐
note that in some languages, the commonly used Plural-Forms expression evaluates to the same value for n=1 and n=21, n=31, and so on. take this Serbian translation for example:
Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
...
msgid "one byte"
msgid_plural "%d bytes"
msgstr[0] "%d bajt"
msgstr[1] "%d bajta"
msgstr[2] "%d bajtova"
here %d should not be replaced with the spelled-out form jedan. either %d should be kept, or the Plural-Forms expression should be amended, so that there is a special case for n=1:
Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
...
msgid "one byte"
msgid_plural "%d bytes"
msgstr[0] "%d bajt"
msgstr[1] "%d bajta"
msgstr[2] "%d bajtova"
msgstr[3] "jedan bajt"
References:
Severity, certainty: serious, possible
c-format-string-non-portable-conversion
a C format string uses a conversion specified or length modifier, for which a more portable replacement exists โจ here's the tea:
- for integer conversions (
%d,%i,%o,%u,%x, and%X), use thelllength modifier instead ofLorq. - for floating-point conversions (
%a,%A,%e,%E,%f,%F,%g, and%G), don't use thellength modifier. - use the
zlength modifier instead ofZ. - use
%lcinstead of%C. - use
%lsinstead of%S.
References:
Severity, certainty: pedantic, possible
c-format-string-redundant-flag
a C format string includes a redundant character flag. either it's a duplicate, or it has no effect ๐
- the
+flag overrides the space flag. - the
-flag overrides the0flag. - if a precision is given, the
0flag has no effect on integer conversions (%d,%i,%o,%u,%x, and%X).
References:
Severity, certainty: pedantic, possible
codomain-error-in-plural-forms
either a plural form value is outside the declared range, or some values within the declared range can never be reached. this normally indicates an error in the plural form expression ๐
References:
Severity, certainty: serious, certain
codomain-error-in-unused-plural-forms
either a plural form value is outside the declared range, or some values within the declared range can never be reached. (but there are no translated messages which use plural forms.) this normally indicates an error in the plural form expression ๐ซ
References:
Severity, certainty: normal, certain
conflict-marker-in-header-entry
the header contains a conflict marker (#-#-#-#-# โฆ #-#-#-#-#). the conflict will have to be resolved manually ๐ค
References:
Severity, certainty: serious, certain
conflict-marker-in-translation
one of the translated messages appear to contain a conflict marker (#-#-#-#-# โฆ #-#-#-#-#). the conflict will have to be resolved manually ๐ค
References:
Severity, certainty: serious, possible
conflicting-message-flags
two flags with conflicting meanings are associated with one of the messages ๐ฉ
References:
Severity, certainty: important, possible
date-from-future
the date refers to the future. as such, it's extremely unlikely to be correct ๐ฎ
Severity, certainty: normal, certain
distant-header-entry
the header entry in this file is preceded by other entries. the header entry should be always the first one ๐
Severity, certainty: important, certain
duplicate-flag-for-header-entry
multiple identical flags are associated with the header entry ๐ซ
Severity, certainty: minor, certain
duplicate-header-entry
this file contains multiple header entries ๐ต
Severity, certainty: serious, certain
duplicate-header-field
this file contains multiple header fields of the same name ๐ฏ
Severity, certainty: minor, wild-guess
duplicate-header-field-content-transfer-encoding
bestie, this file has multiple Content-Transfer-Encoding header fields. one is the vibe, two is a situation. ๐
- Severity, certainty: pedantic, certain
duplicate-header-field-content-type
yep, there's more than one Content-Type header field up in here. pick a lane, file. ๐
- Severity, certainty: serious, certain
duplicate-header-field-date
this file has multiple date header fields of the same name. like, we get it, time exists. โฐ
- Severity, certainty: normal, certain
duplicate-header-field-language
multiple Language header fields?? the file is having a whole identity crisis. ๐
- Severity, certainty: important, certain
duplicate-header-field-language-team
more than one Language-Team header field. one team per file, that's the rule. ๐ซถ
- Severity, certainty: normal, certain
duplicate-header-field-last-translator
multiple Last-Translator header fields. who translated it last? apparently everyone. ๐ญ
- Severity, certainty: normal, certain
duplicate-header-field-mime-version
this file contains multiple MIME-Version header fields. lowkey excessive ngl.
- Severity, certainty: pedantic, certain
duplicate-header-field-plural-forms
multiple Plural-Forms header fields. plural forms are already a lot, and now there's duplicates? not the moment. ๐
- Severity, certainty: serious, certain
duplicate-header-field-project-id-version
this file contains multiple Project-Id-Version header fields. okay project, we know your name and version, relax. โจ
- Severity, certainty: minor, certain
duplicate-header-field-report-msgid-bugs-to
multiple Report-Msgid-Bugs-To header fields. where do the bugs go?? contradictory. ๐
- Severity, certainty: normal, certain
duplicate-header-field-x-poedit
this file contains multiple X-Poedit-* header fields. poedit said double it and give it to the next person. ๐
- Severity, certainty: normal, certain
duplicate-message-definition
this file contains multiple definitions of the same message. iconic of it to define itself twice, but no. ๐ฅ
- Severity, certainty: serious, certain
duplicate-message-flag
one of the messages has multiple identical flags attached to it. same flag twice = not serving. ๐
- Severity, certainty: minor, certain
empty-file
this file doesn't contain any messages. it's giving absolutely nothing, and not in a cute way. ๐ฆ
- Severity, certainty: normal, certain
empty-msgid-message-with-plural-forms
so the message with an empty msgid contains plural forms. those messages are reserved by GNU gettext for header entries, and your code should not call ngettext("", โฆ). periodt. ๐ซ
- Severity, certainty: serious, certain
empty-msgid-message-with-source-code-references
the message with empty msgid contains plural forms. these messages are reserved by GNU gettext for header entries, so your code should not call gettext(""). don't do it bestie.
- Severity, certainty: serious, possible
encoding-in-language-header-field
the language header field has an encoding declaration in it. that info does not belong in this field, so. take it out. ๐ง
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: minor, certain
fuzzy-header-entry
the header entry is marked as fuzzy. for compatibility with very old (<< 0.11) msgfmt(1) versions โ the ones that didn't support fuzzy header entries at all โ it shouldn't be marked as such. ancient-tech respect. ๐บ
References:
- <https://git.savannah.gnu.org/cgit/gettext.git/tree/NEWS?id=v0.11#n44>
- Severity, certainty: pedantic, certain
inconsistent-leading-newlines
some strings in an entry start with a newline, some don't. either all of them start with a newline, or none of them do. consistency is the whole vibe check here. ๐ธ
- Severity, certainty: important, possible
inconsistent-number-of-plural-forms
the number of plural forms in a message definition doesn't match the number of plural forms declared in another message definition. they're not matching and it shows. ๐ญ
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>
- <https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html>
- Severity, certainty: serious, certain
inconsistent-trailing-newlines
some strings in an entry end with a newline, some don't. either all of them end with a newline, or none of them do. pick one, bestie. โจ
- Severity, certainty: important, possible
incorrect-number-of-plural-forms
the number of plural forms in a message definition doesn't match the number declared in the header. the header said one thing, the messages said another. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>
- <https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html>
- Severity, certainty: serious, certain
invalid-content-transfer-encoding
the value of the Content-Transfer-Encoding header field is invalid. it should be 8bit. that's the only correct answer here. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-6.1>
- Severity, certainty: pedantic, certain
invalid-content-type
the value of the Content-Type header field is invalid. it should be in the form text/plain; charset=encoding. that's the format, no deviations. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#index-encoding-of-PO-files>
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-5>
- Severity, certainty: important, possible
invalid-date
the date is invalid, or it's in an invalid format. it should be YYYY-MM-DD hh:mm+ZZzz, like 2011-11-05 10:14+0100. yes, exactly like that. ๐๏ธ
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: normal, certain
invalid-language
the Language header field couldn't be parsed, or it contains a language nobody recognizes. mystery language era. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: important, possible
invalid-language-team
the Language-Team header field contains an e-mail address that uses a reserved domain name, or a partially qualified domain name. not a real reachable address, basically. ๐ซ
References:
- <https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml>
- Severity, certainty: normal, possible
invalid-last-translator
the Last-Translator header field could neither be parsed as an e-mail, or the e-mail address uses a reserved domain name, or a partially qualified domain name. any of those three and it's a no from i18nspector. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- <https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml>
- Severity, certainty: normal, possible
invalid-mime-version
the value of the MIME-Version header field is invalid. it should be 1.0. one point oh. that's it. โญ
References:
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-4>
- Severity, certainty: pedantic, certain
invalid-mo-file
this file couldn't be parsed as a MO file. it tried, it failed, we move. ๐ญ
- Severity, certainty: serious, certain
invalid-range-flag
a range: flag couldn't be parsed, or the range it designates contained fewer than two numbers. the syntax is range: min..max, where both values are non-negative integers. two numbers minimum, non-negative, no exceptions. ๐ข
References:
- <https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html>
- Severity, certainty: important, certain
invalid-report-msgid-bugs-to
the Report-Msgid-Bugs-To header field could neither be parsed as an e-mail nor as a URL, or the e-mail address uses a reserved domain name, or a partially qualified domain name. so many ways to be wrong and it found one. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- <https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml>
- Severity, certainty: normal, possible
language-disparity
the language of this file got declared in multiple places, but the declarations don't match. two sources of truth and they're beefing. ๐
- Severity, certainty: normal, possible
language-team-equal-to-last-translator
the Language-Team and Last-Translator header fields contain the same e-mail address. same person, two hats. ๐ฉ
- Severity, certainty: minor, possible
language-variant-does-not-affect-translation
the Language header field contains a variant designator that isn't relevant for the message translation. extra detail that does nothing for the translation, so it's just kinda there. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: minor, possible
leading-junk-in-plural-forms
the Plural-Forms header field has unexpected text sitting before the nplurals= string.
the GNU gettext runtime ignores that leading junk, but other header parsers might be less liberal in what they accept. so it's fine until it very much isn't. โ ๏ธ
- Severity, certainty: important, certain
malformed-xml
the original string or the translated string contains an XML fragment that is not well-formed. the tags aren't tagging. ๐ง
References:
- <https://www.w3.org/TR/REC-xml/#sec-well-formed>
- Severity, certainty: serious, possible
no-content-transfer-encoding-header-field
the Content-Transfer-Encoding header field doesn't exist at all. it should be set to 8bit. it's just missing, bestie. ๐ญ
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-6.1>
- Severity, certainty: pedantic, certain
no-content-type-header-field
the Content-Type header field doesn't exist. it should be set to text/plain; charset=encoding.
heads up: when there's no encoding declaration at all, i18nspector assumes ASCII encoding. noted. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#index-encoding-of-PO-files>
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-5>
- Severity, certainty: important, certain
no-date-header-field
the date header field doesn't exist. no timestamp, no vibes. ๐ฐ๏ธ
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: minor, certain
no-language-header-field
the Language header field doesn't exist. we literally don't know what language this is. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: pedantic, certain
no-language-team-header-field
the Language-Team header field does not exist. it should contain the English name of the language, plus the email address or homepage URL of the language team. so, like, who even is this team. ๐ซถ
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: pedantic, certain
no-last-translator-header-field
the Last-Translator header field doesn't exist. it should contain the last translator's name and email address. credit where credit is due, bestie. ๐
References:
- <https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html>
- Severity, certainty: normal, certain
no-mime-version-header-field
the MIME-Version header field doesn't exist. it should be set to 1.0. one line, one number, and it's not there. ๐
References:
- <https://www.rfc-editor.org/rfc/rfc2045.html#section-4>
- Severity, certainty: pedantic, certain
no-package-name-in-project-id-version
Okay so the Project-Id-Version header field is givingโฆ nothing? It doesn't appear to contain any name ๐ญ and bestie, it's supposed to hold both the name and the version of the package. Like, the whole point.
References:
Severity, certainty: minor, possible
no-plural-forms-header-field
The Plural-Forms header field straight up does not exist ๐ even though some of the messages use plural forms. (Although โ plot twist โ none of them have actually been translated yet, so it's lowkey chill.) Still flagged tho.
References:
Severity, certainty: minor, certain
no-project-id-version-header-field
The Project-Id-Version header field does not exist. It's supposed to contain the name and the version of the package, and rn it containsโฆ silence ๐
References:
Severity, certainty: minor, certain
no-report-msgid-bugs-to-header-field
The Report-Msgid-Bugs-To header field does not exist, or it exists but it's empty (the audacity โ). It should contain an email address or a URL where someone can report bugs in the untranslated strings. Give the people a place to yell, bestie ๐ซถ
References:
Severity, certainty: normal, certain
no-required-plural-forms-header-field
The Plural-Forms header field does not exist, and this time it's not a drill โ some of the translated messages use plural forms. So yeah, this one's actually needed.
References:
Severity, certainty: serious, certain
no-version-in-project-id-version
The Project-Id-Version header field doesn't appear to contain any version. It should contain both the name and the version of the package. Name only? Not the vibe. It's giving incomplete ๐
References:
Severity, certainty: pedantic, possible
non-ascii-compatible-encoding
This file uses an encoding that is not compatible with ASCII. That's it, that's the whole thing, and it's kind of a big deal.
Severity, certainty: serious, certain
non-portable-encoding
This file uses an encoding that is not widely supported by software. Not portable, not slay. Proceed with caution.
References:
Severity, certainty: important, certain
os-error
An input/output error or another operating system error happened while checking this file. The OS said "not today" ๐ญ
Severity, certainty: serious, certain
partially-translated-message
Translation is missing for some plural forms of a message. Half a translation is not a whole translation, bestie.
Severity, certainty: serious, possible
perl-brace-format-string-error
A Perl format string could not be parsed. It's giving unparseable ๐ฅ
References:
Severity, certainty: serious, possible
perl-brace-format-string-missing-argument
Okay so a Perl format string for msgid doesn't use a named argument that is used in msgid_plural; or msgstr doesn't use a named argument that is used in msgid; or msgstr[N] doesn't use a named argument that is used in the corresponding msgid or msgid_plural.
Now the important bit โ in some languages, the commonly used Plural-Forms expression evaluates to the same value for n=1 and n=21, n=31, and so on. Take this Serbian translation for example:
Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
...
msgid "one byte"
msgid_plural "{n} bytes"
msgstr[0] "{n} bajt"
msgstr[1] "{n} bajta"
msgstr[2] "{n} bajtova"
Here {n} should not be replaced with the spelled-out form jedan. Either {n} should be kept, or the Plural-Forms expression should be amended, so that there is a special case for n=1:
Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
...
msgid "one byte"
msgid_plural "{n} bytes"
msgstr[0] "{n} bajt"
msgstr[1] "{n} bajta"
msgstr[2] "{n} bajtova"
msgstr[3] "jedan bajt"
References:
- <https://www.gnu.org/software/gettext/manual/html_node/perl_002dformat.html>
- <https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html>
Severity, certainty: serious, possible
perl-brace-format-string-unknown-argument
A Perl format string for msgid uses a named argument that isn't used in msgid_plural; or msgstr uses a named argument that isn't used in msgid; or msgstr[N] uses a named argument that isn't used in the corresponding msgid or msgid_plural. This indicates that the conversion would try to consume an argument that weren't supplied. Rude of it, honestly.
References:
- <https://www.gnu.org/software/gettext/manual/html_node/perl_002dformat.html>
- <https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>
Severity, certainty: serious, possible
python-brace-format-string-argument-type-mismatch
There's a type mismatch between a Python format argument in msgid and the corresponding format argument in msgid_plural; or between a Python format argument in msgstr and msgid; or between a Python format argument in msgstr[N] and msgid or msgid_plural. Types didn't match, they're not compatible, it's not gonna work out ๐
References:
Severity, certainty: serious, possible
python-brace-format-string-error
A Python format string could not be parsed. That's the whole saga.
References:
Severity, certainty: serious, possible
python-brace-format-string-missing-argument
A Python format string for msgid doesn't use a named argument that is used in msgid_plural; or msgstr doesn't use a named argument that is used in msgid; or msgstr[N] doesn't use a named argument that is used in the corresponding msgid or msgid_plural.
And here's the lil linguistics moment again: in some languages, the commonly used Plural-Forms expression evaluates to the same value for n=1 and n=21, n=31, and so on. Take this Serbian translation for example:
Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
...
msgid "one byte"
msgid_plural "{n} bytes"
msgstr[0] "{n} bajt"
msgstr[1] "{n} bajta"
msgstr[2] "{n} bajtova"
Here {n} should not be replaced with the spelled-out form jedan. Either {n} should be kept, or the Plural-Forms expression should be amended, so that there is a special case for n=1:
Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
...
msgid "one byte"
msgid_plural "{n} bytes"
msgstr[0] "{n} bajt"
msgstr[1] "{n} bajta"
msgstr[2] "{n} bajtova"
msgstr[3] "jedan bajt"
References:
- <https://docs.python.org/2/library/string.html#formatstrings>
- <https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html>
Severity, certainty: serious, possible
python-brace-format-string-unknown-argument
A Python format string for msgid uses a named argument that isn't used in msgid_plural; or msgstr uses a named argument that isn't used in msgid; or msgstr[N] uses a named argument that isn't used in the corresponding msgid or msgid_plural. This indicates that the conversion would try to consume an argument that weren't supplied. Mystery argument, uninvited, iconic behavior.
References:
- <https://docs.python.org/2/library/string.html#formatstrings>
- <https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>
Severity, certainty: serious, possible
python-format-string-argument-number-mismatch
A Python format string for msgid consumes more arguments than msgid_plural; or msgstr consumes more arguments than msgid; or msgstr[N] consumes more arguments than msgid or msgid_plural. Somebody's eating more than their share ๐
And fr fr โ Python, unlike C, requires that all unnamed arguments must be consumed during conversion. No leftovers allowed.
References:
- <https://docs.python.org/2/library/stdtypes.html#string-formatting-operations>
- <https://www.gnu.org/software/gettext/manual/html_node/Python.html#Python>
Severity, certainty: serious, possible
python-format-string-argument-type-mismatch
There's a type mismatch between a Python format argument in msgid and the corresponding format argument in msgid_plural; or between a Python format argument in msgstr and msgid; or between a Python format argument in msgstr[N] and msgid or msgid_plural.
References:
Severity, certainty: serious, possible
python-format-string-error
A Python format string could not be parsed. The parser looked at it and said "nope" ๐
References:
Severity, certainty: serious, possible
python-format-string-missing-argument
A Python format string for msgid doesn't use a named argument that is used in msgid_plural; or msgstr doesn't use a named argument that is used in msgid; or msgstr[N] doesn't use a named argument that is used in the corresponding msgid or msgid_plural.
Okay so same plot as before: in some languages, the commonly used Plural-Forms expression evaluates to the same value for n=1 and n=21, n=31, and so on. Take this Serbian translation for example:
Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
...
msgid "one byte"
msgid_plural "%(n)d bytes"
msgstr[0] "%(n)d bajt"
msgstr[1] "%(n)d bajta"
msgstr[2] "%(n)d bajtova"
Here %d should not be replaced with the spelled-out form jedan. Either %d should be kept, or the Plural-Forms expression should be amended, so that there is a special case for n=1:
Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
...
msgid "one byte"
msgid_plural "%(n)d bytes"
msgstr[0] "%(n)d bajt"
msgstr[1] "%(n)d bajta"
msgstr[2] "%(n)d bajtova"
msgstr[3] "jedan bajt"
References:
- <https://docs.python.org/2/library/stdtypes.html#string-formatting-operations>
- <https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html>
Severity, certainty: serious, possible
python-format-string-multiple-unnamed-arguments
A Python format string uses multiple unnamed arguments (such as %d). The translator might need to reorder the arguments to properly translate the message, but this is not possible with unnamed arguments. Named arguments (such as %(num)d) should be used instead. Name your args, bestie, it's the polite thing to do ๐ธ
References:
- <https://docs.python.org/2/library/stdtypes.html#string-formatting-operations>
- <https://www.gnu.org/software/gettext/manual/html_node/Python.html#Python>
Severity, certainty: serious, possible
python-format-string-obsolete-conversion
bestie your Python format string is out here using an obsolete conversion specifier ๐ it's giving 2009
- use
%dinstead of%u, that's literally the whole fix
References:
Severity, certainty: pedantic, possible
python-format-string-redundant-flag
your Python format string has a redundant character flag, bestie ๐ either it's a straight-up duplicate or it's justโฆ doing nothing:
- the
+flag overrides the space flag - the
-flag overrides the0flag - if a precision is given, the
0flag has no effect on integer conversions (%d,%i,%o,%u,%x, and%X)
References:
Severity, certainty: pedantic, possible
python-format-string-redundant-length
a redundant length modifier is hanging out in your Python format string ๐ญ and here's the tea: length modifiers (h, l, or L) have no effect in Python. none. zero. nada.
References:
Severity, certainty: pedantic, possible
python-format-string-redundant-precision
a C format string includes precision that has no effect on the conversion. that precision is not serving, it's just vibing โจ
References:
Severity, certainty: pedantic, possible
python-format-string-unknown-argument
okay this one's a little messy so let's break it down ๐
- a Python format string for
msgiduses a named argument that isn't used inmsgid_plural - or
msgstruses a named argument that isn't used inmsgid - or
msgstr[N]uses a named argument that isn't used in the correspondingmsgidormsgid_plural
what does that mean? it means the conversion would try to consume an argument that wasn't supplied. not the vibe. not the move.
References:
<https://docs.python.org/2/library/stdtypes.html#string-formatting-operations><https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html>
Severity, certainty: serious, possible
python-format-string-unnamed-plural-argument
a Python format string is using an unnamed argument (like %d) in the context of plural forms. the translator might want to not use the numeric argument in the singular form โ totally valid โ but that's just not possible if the argument is unnamed, because Python, unlike C, requires that all unnamed arguments must be consumed during conversion. no skipping, no opting out ๐ซ
so: named arguments (like %(n)d) should be used instead. periodt.
References:
<https://docs.python.org/2/library/stdtypes.html#string-formatting-operations><https://www.gnu.org/software/gettext/manual/html_node/Python.html#Python>
Severity, certainty: wishlist, possible
qt-plural-format-mistaken-for-c-format
a c-format flag is associated with the message, but bestieโฆ qt-plural-format should be used instead ๐ธ
here's why: the only C format directive that the message uses is %n. and using %n all by itself in a C format string is very atypical. suspicious, even. it's giving identity crisis.
References:
Severity, certainty: important, possible
range-flag-without-plural-string
a range: flag is associated with a message that doesn't have a plural string ๐ญ and range: flags only make sense for translations involving plural forms. it's a flag with nothing to do, standing in the corner at the party.
References:
Severity, certainty: normal, certain
redundant-message-flag
a flag associated with one of the messages is redundant, because it's implied by another flag. two flags, one job ๐
References:
Severity, certainty: pedantic, certain
stray-header-line
the header contains a line that does not belong to any header field. it's justโฆ there. a stray. an orphan. ๐
heads up: RFC-822-style folding of long headers is not supported. so don't try it.
References:
Severity, certainty: important, certain
stray-previous-msgid
the message entry contains annotations about previous untranslated string (#| msgid ...), even though the message is not marked as fuzzy. those annotations are only useful for fuzzy messages, and should be removed when unfuzzying. it's giving leftovers in the fridge ๐ฅด
References:
Severity, certainty: minor, certain
syntax-error-in-plural-forms
the value of the Plural-Forms header field could not be parsed ๐ญ it should be in the form nplurals=n; plural=expression.
References:
Severity, certainty: serious, certain
syntax-error-in-po-file
this file couldn't be parsed as a PO file ๐ in some rare cases this is due to incorrect or missing encoding declaration.
References:
<https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html><https://bugs.debian.org/692283>
Severity, certainty: serious, possible
syntax-error-in-unused-plural-forms
the value of the Plural-Forms header field could not be parsed ๐ญ (but plot twist: there are no translated messages which use plural forms.) it should be in the form nplurals=n; plural=expression.
References:
Severity, certainty: important, certain
trailing-junk-in-plural-forms
the Plural-Forms header field contains unexpected text after the plural expression. extra. uninvited. ๐
the GNU gettext runtime ignores such trailing junk, but other header parsers might be less liberal in what they accept. so like, don't rely on everyone being this chill.
Severity, certainty: important, certain
translation-in-template
the PO template file contains a translated message ๐จ a template is supposed to be untranslated, bestie. that's its whole thing.
Severity, certainty: minor, certain
unable-to-determine-language
i18nspector was unable to determine the language of this file ๐ญ and the absence of this information will prevent it from performing further checks. so it's not just a little oopsie, it's a whole roadblock.
Severity, certainty: normal, wild-guess
unexpected-flag-for-header-entry
an unexpected flag is associated with the header entry. the only flag that makes sense for the header entry is fuzzy. everything else is just cosplaying ๐
References:
Severity, certainty: normal, possible
unknown-encoding
this file declares an encoding that couldn't be recognized by i18nspector. it might be a typo ๐ and heads up: the absence of encoding information will prevent i18nspector from performing further checks.
Severity, certainty: important, possible
unknown-file-type
the file format of this file couldn't be recognized. and honestly? it might be a bug in i18nspector itself ๐ not you, us.
Severity, certainty: normal, wild-guess
unknown-header-field
the header field name is unknown to i18nspector. it might be a typo or a capitalization error โ and yes, header field names are case-sensitive, so Plural-Forms and plural-forms are not the same girl ๐
References:
Severity, certainty: minor, wild-guess
unknown-message-flag
an unknown flag is associated with one of the messages. it might be a typo ๐ซ
References:
Severity, certainty: normal, wild-guess
unknown-poedit-language
the language declared in X-Poedit-Language couldn't be recognized. it might be a bug in i18nspector ๐
Severity, certainty: minor, wild-guess
unrepresentable-characters
the declared encoding cannot represent all characters commonly used in this language. and that is a strong indication that the declared encoding is incorrect. like, screaming-in-caps strong.
Severity, certainty: serious, possible
unusual-character-in-header-entry
the header entry contains an unusual character ๐ this is usually an indication of an encoding problem, such as:
- using ISO 2022 escape sequences, or
- using UTF-8 despite declaring an 8-bit encoding
References:
Severity, certainty: important, certain
unusual-character-in-translation
one of the translated messages contains an unusual character ๐ this is usually an indication of an encoding problem, such as:
- using ISO 2022 escape sequences, or
- using UTF-8 despite declaring an 8-bit encoding
References:
Severity, certainty: important, possible
unusual-plural-forms
the Plural-Forms declaration is incorrect (or unusual), according to i18nspector's linguistic data. it's not like other girls and not in a slay way ๐ซ
Severity, certainty: serious, possible
unusual-unused-plural-forms
the Plural-Forms declaration is incorrect (or unusual), according to i18nspector's linguistic data. (but there are no translated messages which use plural forms โ so it's a problem that's justโฆ sitting there unused.)
Severity, certainty: normal, possible
See also โจ
msgfmt(1), particularly the-coption ๐
that's a wrap bestie, and if you made it all the way to the end of this absolute doorstop of a manpage, you're genuinely the main character ๐ this whole thing was i18nspector 0.27.2, dated 2026-01-13 โ go forth and make your PO files iconic, no cap ๐๐ฆ๐
๐ฆ where this page comes from
- ubuntu resolute: i18nspector 0.27.2-1 ยท MIT
- ubuntu stonking: i18nspector 0.27.2-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms