Skip to content

Commit 1a3b1d0

Browse files
author
Maciej Olko
committed
Fix resource name matching for What's new articles
1 parent 172622c commit 1a3b1d0

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

.tx/config

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,87 +2332,87 @@ type = PO
23322332
source_lang = en
23332333

23342334
[python-newest.whatsnew--2_0]
2335-
trans.pl = whatsnew/2_0.po
2335+
trans.pl = whatsnew/2.0.po
23362336
type = PO
23372337
source_lang = en
23382338

23392339
[python-newest.whatsnew--2_1]
2340-
trans.pl = whatsnew/2_1.po
2340+
trans.pl = whatsnew/2.1.po
23412341
type = PO
23422342
source_lang = en
23432343

23442344
[python-newest.whatsnew--2_2]
2345-
trans.pl = whatsnew/2_2.po
2345+
trans.pl = whatsnew/2.2.po
23462346
type = PO
23472347
source_lang = en
23482348

23492349
[python-newest.whatsnew--2_3]
2350-
trans.pl = whatsnew/2_3.po
2350+
trans.pl = whatsnew/2.3.po
23512351
type = PO
23522352
source_lang = en
23532353

23542354
[python-newest.whatsnew--2_4]
2355-
trans.pl = whatsnew/2_4.po
2355+
trans.pl = whatsnew/2.4.po
23562356
type = PO
23572357
source_lang = en
23582358

23592359
[python-newest.whatsnew--2_5]
2360-
trans.pl = whatsnew/2_5.po
2360+
trans.pl = whatsnew/2.5.po
23612361
type = PO
23622362
source_lang = en
23632363

23642364
[python-newest.whatsnew--2_6]
2365-
trans.pl = whatsnew/2_6.po
2365+
trans.pl = whatsnew/2.6.po
23662366
type = PO
23672367
source_lang = en
23682368

23692369
[python-newest.whatsnew--2_7]
2370-
trans.pl = whatsnew/2_7.po
2370+
trans.pl = whatsnew/2.7.po
23712371
type = PO
23722372
source_lang = en
23732373

23742374
[python-newest.whatsnew--3_0]
2375-
trans.pl = whatsnew/3_0.po
2375+
trans.pl = whatsnew/3.0.po
23762376
type = PO
23772377
source_lang = en
23782378

23792379
[python-newest.whatsnew--3_1]
2380-
trans.pl = whatsnew/3_1.po
2380+
trans.pl = whatsnew/3.1.po
23812381
type = PO
23822382
source_lang = en
23832383

23842384
[python-newest.whatsnew--3_2]
2385-
trans.pl = whatsnew/3_2.po
2385+
trans.pl = whatsnew/3.2.po
23862386
type = PO
23872387
source_lang = en
23882388

23892389
[python-newest.whatsnew--3_3]
2390-
trans.pl = whatsnew/3_3.po
2390+
trans.pl = whatsnew/3.3.po
23912391
type = PO
23922392
source_lang = en
23932393

23942394
[python-newest.whatsnew--3_4]
2395-
trans.pl = whatsnew/3_4.po
2395+
trans.pl = whatsnew/3.4.po
23962396
type = PO
23972397
source_lang = en
23982398

23992399
[python-newest.whatsnew--3_5]
2400-
trans.pl = whatsnew/3_5.po
2400+
trans.pl = whatsnew/3.5.po
24012401
type = PO
24022402
source_lang = en
24032403

24042404
[python-newest.whatsnew--3_6]
2405-
trans.pl = whatsnew/3_6.po
2405+
trans.pl = whatsnew/3.6.po
24062406
type = PO
24072407
source_lang = en
24082408

24092409
[python-newest.whatsnew--3_7]
2410-
trans.pl = whatsnew/3_7.po
2410+
trans.pl = whatsnew/3.7.po
24112411
type = PO
24122412
source_lang = en
24132413

24142414
[python-newest.whatsnew--3_8]
2415-
trans.pl = whatsnew/3_8.po
2415+
trans.pl = whatsnew/3.8.po
24162416
type = PO
24172417
source_lang = en
24182418

manage_translation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# * regenerate_tx_config: recreate configuration for all resources.
1414

1515
import os
16+
from re import match
1617
import sys
1718
from argparse import ArgumentParser
1819
from subprocess import call
@@ -61,6 +62,8 @@ def recreate_tx_config():
6162
name = RESOURCE_NAME_MAP.get(slug, slug)
6263
if '--' in slug:
6364
directory, file_name = name.split('--')
65+
if match(r'\d+_\d+', file_name):
66+
file_name = file_name.replace('_', '.')
6467
config.writelines((
6568
'\n',
6669
f'[{PROJECT_SLUG}.{slug}]\n',
File renamed without changes.

0 commit comments

Comments
 (0)