LOCALE:...EXT.3PM(1)
πΈ LOCALE:β¦EXT.3PM β the Locale::Po4a::Text era π
okay bestie, so this is a Perl man page from the User Contributed Perl Documentation corner of the universe, and it's about Locale::Po4a::Text β a module that converts text documents from/to PO files. yes, both directions. it's giving bilingual icon behavior β¨
π NAME π
Locale::Po4a::Text β converts text documents from/to PO files. periodt.
π DESCRIPTION π
so the whole po4a (PO for anything) project has one goal: make translations easier β and honestly, even more interestingly, make maintaining translations easier β by using gettext tools on places nobody expected them, like documentation. lowkey genius π§ β¨
Locale::Po4a::Text is the module that helps you translate text documents into other [human] languages. yes, human β that's literally in the brackets, iykyk π«Ά
the rules of the land:
- paragraphs get split on empty lines (or on lines that contain only spaces or tabulations). that's the divider, bestie π
- if a paragraph contains a line starting with a space (or a tabulation), that paragraph will not be rewrapped. nope. it's staying exactly how it is π
β¨ OPTIONS ACCEPTED BY THIS MODULE β¨
these are this module's very own particular options, and honestly? each one ate:
keyvalueβ treat paragraphs that look like a colon-separated key-value pair as verbatim (with theno-wrapflag in the PO file). and what counts as a key-value pair string? a string likekey: valueβ meaning it contains one or more non-colon and non-space characters, followed by a colon, followed by at least one non-space character before the end of the line. precise. iconic. πnobulletsβ deactivates the detection of bullets. bye bye bullet detection π«‘
by default, when a bullet is detected, the bullet paragraph is not considered a verbatim paragraph (with the no-wrap flag in the PO file). instead, the corresponding paragraph gets rewrapped in the translation. so this flag is the "actually, don't" button π
tabs=modeβ specifies how tabulations shall be handled.modecan be any of these two cuties:splitβ lines with tabulations introduce breaks in the current paragraph. tab = new paragraph energy πverbatimβ paragraphs containing tabulations will not be re-wrapped. hands off β
by default, tabulations are just considered as spaces. no drama πΈ
breaks=regexβ a regular expression matching lines which introduce breaks. and heads up, the regex will be anchored, so the whole line must match. no partial matches, bestie π―debianchangelogβ handles the header and footer of released versions, which only contain non-translatable information. so we skip the boring bits πfortunesβ handles the fortunes format, which separates fortunes with a line that consists in%or%%, and uses%%as the beginning of a comment. cute format, cute handling πmarkdownβ handles some special markup in Markdown-formatted texts. markdown girlies rise πyfm_keys(markdown-only) β comma-separated list of keys to process for translation in the YAML Front Matter section. all other keys are skipped. keys are matched with a case-sensitive match. ifyfm_pathsandyfm_keysare used together, values are included if they are matched by at least one of the options. array values are always translated, unless theyfm_skip_arrayoption is provided πyfm_lenient(markdown only) β allows the YAML Front Matter parser to fail on malformated headers. particularly helpful when your file starts with a horizontal ruler instead of a YAML Front Matter, but you insist on using three dashes only for your ruler. we've all been there πyfm_paths(markdown only) β comma-separated list of hash paths to process for extraction in the YAML Front Matter section, all other paths are skipped. paths are matched with a case-sensitive match. ifyfm_pathsandyfm_keysare used together, values are included if they are matched by at least one of the options. arrays values are always returned unless theyfm_skip_arrayoption is provided πyfm_pathsβ yes bestie, it's listed a second time in the source with no parenthetical. same option, same spelling, we're keeping it exactly as it appears. no cap π«Άyfm_skip_array(markdown-only) β do not translate array values in the YAML Front Matter section. skip 'em π¦control[=field_list]β handles Debian's control files. and yes, you can hand it a comma-separated list of fields to be translated. customized translation, we love to see it πneverwrapβ prevents po4a from wrapping any lines. this means every content is handled verbatim, even simple paragraphs. truly the "no thoughts, just vibes, keep my line breaks" option π
π STATUS OF THIS MODULE π
tested successfully on simple text files and NEWS.Debian files. she passed the vibe check β
β¨
π AUTHORS π
- Nicolas FranΓ§ois
<nicolas.francois@centraliens.net>β an actual legend π«Ά
π COPYRIGHT AND LICENSE π
- Copyright Β© 2005-2008 Nicolas FRANΓOIS
<nicolas.francois@centraliens.net>. - Copyright Β© 2008-2009, 2018 Jonas Smedegaard
<dr@jones.dk>. - Copyright Β© 2020 Martin Quinson
<mquinson#debian.org>.
this program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file). free software rights, we stan π
and that's the whole page, bestie π₯° this fine piece of documentation is brought to you by perl v5.42.0, dated 2025-07-13, and filed under LOCALE:...EXT.3PM(1). go forth and translate literally everything π
β¨πΈ
π¦ where this page comes from
- alpine 3.23: po4a-doc 0.74-r0 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms