Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8393d3

Browse files
committed
Remove left-over files and add a script to warn about new ones
1 parenta40745f commitd8393d3

File tree

2 files changed

+17
-223
lines changed

2 files changed

+17
-223
lines changed

‎library/email_util.po

Lines changed: 0 additions & 222 deletions
This file was deleted.

‎manage_translation.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
fromcollectionsimportCounter
1717
importos
1818
fromdataclassesimportdataclass
19+
frompathlibimportPath
1920
fromreimportmatch,search
2021
fromsubprocessimportcall,run
2122
importsys
2223
fromurllib.parseimportunquote
24+
fromwarningsimportwarn
2325

2426
LANGUAGE='pl'
2527

@@ -91,6 +93,20 @@ def recreate_tx_config():
9193
'source_lang = en\n',
9294
)
9395
)
96+
warn_about_files_to_delete()
97+
98+
defwarn_about_files_to_delete():
99+
files=list(_get_files_to_delete())
100+
ifnotfiles:
101+
return
102+
warn(f'Found{len(files)} file(s) to delete:{", ".join(files)}.')
103+
104+
def_get_files_to_delete():
105+
withopen('.tx/config')asconfig_file:
106+
config=config_file.read()
107+
forfileinPath().rglob('*.po'):
108+
ifos.fsdecode(file)notinconfig:
109+
yieldos.fsdecode(file)
94110

95111

96112
@dataclass
@@ -259,7 +275,7 @@ def average(averages, weights):
259275

260276

261277
if__name__=="__main__":
262-
RUNNABLE_SCRIPTS= ('fetch','recreate_tx_config','recreate_readme')
278+
RUNNABLE_SCRIPTS= ('fetch','recreate_tx_config','recreate_readme','warn_about_files_to_delete')
263279

264280
parser=ArgumentParser()
265281
parser.add_argument('cmd',nargs=1,choices=RUNNABLE_SCRIPTS)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp