<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/po/.gitattributes, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=master</id>
<link rel='self' href='https://git.shady.money/git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-02T23:36:51Z</updated>
<entry>
<title>l10n: add .gitattributes to simplify location filtering</title>
<updated>2026-04-02T23:36:51Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2026-02-04T03:39:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a14bcfec8cd606371e0e1bd0054bbe22f539cb1'/>
<id>urn:sha1:3a14bcfec8cd606371e0e1bd0054bbe22f539cb1</id>
<content type='text'>
To simplify the location filtering process for l10n contributors when
committing po/XX.po files, add filter attributes for selected PO
files to the repository. This ensures all contributors automatically
get the same filter configuration without manual setup in
.git/info/attributes.

The default filter (gettext-no-location) is applied to all .po files
except:

- Legacy, unmaintained PO files that still contain location comments.
  Leaving the filter off avoids index vs working-tree discrepancies for
  these files. The CI pipeline will report an error when future updates
  touch these legacy files.
- Some PO files use a different filter that strips only line numbers
  from location comments while keeping filenames.

Contributors still need to manually define the filter drivers via
git-config as documented in po/README.md.

Four PO files that use location filtering (po/ca.po, po/es.po, po/ga.po,
po/ru.po) were batch-modified so their on-disk format matches the filter
output (e.g. line wrapping), avoiding index vs working-tree mismatch.

Additionally, po/README.md has been reorganized: the material on
preparing location-less PO files for commit has been moved from
"Updating a XX.po file" to a separate "Preparing a XX.po file for
commit" section. This prevents AI agents from introducing unrelated
operations when updating PO files.

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
</content>
</entry>
</feed>
