Subject: Re: [PATCH v3 1/5] l10n: add .gitattributes to simplify location filtering

From: Johannes Sixt <[email-masked]>
Date: Sun, 15 Mar 2026 12:13:08 +0100

Am 14.03.26 um 15:38 schrieb Jiang Xin:
> +# Two filter types are used:
> +# 1. gettext-no-file-no-location: Strips both filenames and line numbers
> +#    (e.g., removes "#: main.c:123" entirely)
> +# 2. gettext-no-location: Preserves filenames but removes line numbers, which
> +#    requires gettext 0.20 or higher
> +#    (e.g., "#: main.c:123" becomes "#: main.c")
> +#
> +# See `po/README.md` for instructions on setting up the required filter drivers.
> +
> +# Do not apply these filters to all `*.po` files via a wildcard. For legacy,
> +# unmaintained PO files, that would cause discrepancies between the filtered
> +# blob in the index and the unfiltered file in the working tree.
> +
> +# Languages that strip both filenames and line numbers
> +bg.po	filter=gettext-no-file-no-location
> +de.po	filter=gettext-no-file-no-location
> +#es.po	filter=gettext-no-file-no-location
> +fr.po	filter=gettext-no-file-no-location
> +#ga.po	filter=gettext-no-file-no-location
> +#ru.po	filter=gettext-no-file-no-location
> +sv.po	filter=gettext-no-file-no-location
> +tr.po	filter=gettext-no-file-no-location
> +uk.po	filter=gettext-no-file-no-location
> +vi.po	filter=gettext-no-file-no-location
> +
> +# Languages that preserve filenames but strip line numbers
> +#ca.po	filter=gettext-no-location
> +id.po	filter=gettext-no-location
> +zh_CN.po	filter=gettext-no-location
> +zh_TW.po	filter=gettext-no-location

How settled is the use of these two different filters (and names) in the
community of translators? I am asking because I'm about to align the
translation workflow in the Gitk repository with that in the Git
repository. I need to know which of the two variants of filter names I
should ask translators to use.

-- Hannes