Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4010545
D524.id1280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D524.id1280.diff
View Options
diff --git a/create_given_name b/create_given_name
--- a/create_given_name
+++ b/create_given_name
@@ -66,18 +66,12 @@
'U': 'l10n/givenname-u.json'
}
-# Gets whitelist latin languages to avoid create the element in other scripts.
-with open('l10n/latin-whitelist.json') as data_file:
- latin_languages = json.load(data_file)
-
# Gets descriptions from l10n file, and fill labels for these languages.
script_directory = os.path.dirname(os.path.realpath(__file__))
l10n_file = os.path.join(script_directory, l10n_files[genre])
with open(l10n_file) as data_file:
descriptions = json.load(data_file)
-
-labels_languages = set(descriptions.keys()).intersection(latin_languages)
-labels = {lang:givenname for lang in labels_languages}
+labels = {lang:givenname for lang in descriptions.keys()}
item.editLabels(labels, summary='Adding given name labels')
item.editDescriptions(descriptions, summary='Adding given name descriptions')
diff --git a/create_surname b/create_surname
--- a/create_surname
+++ b/create_surname
@@ -42,18 +42,12 @@
item = pywikibot.ItemPage(repo, title=title)
item.get()
-# Gets whitelist latin languages to avoid create the element in other scripts.
-with open('l10n/latin-whitelist.json') as data_file:
- latin_languages = json.load(data_file)
-
# Gets descriptions from l10n file, and fill labels for these languages.
script_directory = os.path.dirname(os.path.realpath(__file__))
l10n_file = os.path.join(script_directory, 'l10n', 'surname.json')
with open(l10n_file) as data_file:
descriptions = json.load(data_file)
-
-labels_languages = set(descriptions.keys()).intersection(latin_languages)
-labels = {lang: surname for lang in latin_languages}
+labels = {lang: surname for lang in descriptions.keys()}
item.editLabels(labels, summary='Adding surname labels')
item.editDescriptions(descriptions, summary='Adding surname descriptions')
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 12:40 (24 m, 40 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2354301
Default Alt Text
D524.id1280.diff (1 KB)
Attached To
Mode
D524: Revert "Use latin script languages whitelist"
Attached
Detach File
Event Timeline
Log In to Comment