Commit 3a14bcf
committed
l10n: add .gitattributes to simplify location filtering
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 <worldhello.net@gmail.com>1 parent 2565546 commit 3a14bcf
6 files changed
Lines changed: 161 additions & 119 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 162 | | |
195 | 163 | | |
196 | 164 | | |
| |||
229 | 197 | | |
230 | 198 | | |
231 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
232 | 239 | | |
233 | 240 | | |
234 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
516 | | - | |
| 515 | + | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
3879 | 3879 | | |
3880 | 3880 | | |
3881 | 3881 | | |
3882 | | - | |
3883 | | - | |
| 3882 | + | |
| 3883 | + | |
3884 | 3884 | | |
3885 | | - | |
3886 | | - | |
| 3885 | + | |
| 3886 | + | |
3887 | 3887 | | |
3888 | 3888 | | |
3889 | 3889 | | |
| |||
7983 | 7983 | | |
7984 | 7984 | | |
7985 | 7985 | | |
7986 | | - | |
7987 | | - | |
| 7986 | + | |
| 7987 | + | |
7988 | 7988 | | |
7989 | | - | |
7990 | | - | |
| 7989 | + | |
| 7990 | + | |
7991 | 7991 | | |
7992 | 7992 | | |
7993 | 7993 | | |
| |||
11436 | 11436 | | |
11437 | 11437 | | |
11438 | 11438 | | |
11439 | | - | |
11440 | | - | |
| 11439 | + | |
| 11440 | + | |
11441 | 11441 | | |
11442 | 11442 | | |
11443 | 11443 | | |
| |||
11451 | 11451 | | |
11452 | 11452 | | |
11453 | 11453 | | |
11454 | | - | |
11455 | | - | |
| 11454 | + | |
| 11455 | + | |
11456 | 11456 | | |
11457 | 11457 | | |
11458 | 11458 | | |
| |||
13231 | 13231 | | |
13232 | 13232 | | |
13233 | 13233 | | |
13234 | | - | |
13235 | | - | |
| 13234 | + | |
| 13235 | + | |
13236 | 13236 | | |
13237 | 13237 | | |
13238 | 13238 | | |
| |||
14440 | 14440 | | |
14441 | 14441 | | |
14442 | 14442 | | |
14443 | | - | |
14444 | | - | |
| 14443 | + | |
| 14444 | + | |
14445 | 14445 | | |
14446 | 14446 | | |
14447 | 14447 | | |
| |||
19350 | 19350 | | |
19351 | 19351 | | |
19352 | 19352 | | |
19353 | | - | |
19354 | | - | |
| 19353 | + | |
| 19354 | + | |
19355 | 19355 | | |
19356 | | - | |
19357 | | - | |
| 19356 | + | |
| 19357 | + | |
19358 | 19358 | | |
19359 | 19359 | | |
19360 | 19360 | | |
| |||
22940 | 22940 | | |
22941 | 22941 | | |
22942 | 22942 | | |
22943 | | - | |
22944 | | - | |
| 22943 | + | |
| 22944 | + | |
22945 | 22945 | | |
22946 | 22946 | | |
22947 | 22947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | | - | |
| 394 | + | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
2294 | 2294 | | |
2295 | 2295 | | |
2296 | 2296 | | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
2300 | 2300 | | |
2301 | 2301 | | |
2302 | 2302 | | |
| |||
2983 | 2983 | | |
2984 | 2984 | | |
2985 | 2985 | | |
2986 | | - | |
2987 | | - | |
| 2986 | + | |
| 2987 | + | |
2988 | 2988 | | |
2989 | | - | |
2990 | | - | |
| 2989 | + | |
| 2990 | + | |
2991 | 2991 | | |
2992 | 2992 | | |
2993 | 2993 | | |
| |||
5983 | 5983 | | |
5984 | 5984 | | |
5985 | 5985 | | |
5986 | | - | |
5987 | | - | |
| 5986 | + | |
| 5987 | + | |
5988 | 5988 | | |
5989 | | - | |
5990 | | - | |
| 5989 | + | |
| 5990 | + | |
5991 | 5991 | | |
5992 | 5992 | | |
5993 | 5993 | | |
| |||
8914 | 8914 | | |
8915 | 8915 | | |
8916 | 8916 | | |
8917 | | - | |
8918 | | - | |
| 8917 | + | |
| 8918 | + | |
8919 | 8919 | | |
8920 | 8920 | | |
8921 | 8921 | | |
| |||
9489 | 9489 | | |
9490 | 9490 | | |
9491 | 9491 | | |
9492 | | - | |
9493 | | - | |
| 9492 | + | |
| 9493 | + | |
9494 | 9494 | | |
9495 | 9495 | | |
9496 | 9496 | | |
| |||
0 commit comments