remove xmlns tools:ignore from translations
XML namespaces are a massive pain to deal with in, and they are totally unneeded in the translation files. xmlns:tools is only needed in the source file to ignore some lint warnings.
This commit is contained in:
parent
3df626aed1
commit
38403338da
@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools"><string name="app_name">ಎಫ್-ಡ್ರಾಯ್ಡ್</string>
|
<resources><string name="app_name">ಎಫ್-ಡ್ರಾಯ್ಡ್</string>
|
||||||
|
|
||||||
<string name="version">ಆವೃತ್ತಿ</string>
|
<string name="version">ಆವೃತ್ತಿ</string>
|
||||||
<string name="notification_action_install">ಅನುಸ್ಥಾಪಿಸು</string>
|
<string name="notification_action_install">ಅನುಸ್ಥಾಪಿಸು</string>
|
||||||
@ -31,10 +31,10 @@
|
|||||||
<string name="nearby_splash__find_people_button">ನನ್ನ ಹತ್ತಿರವಿರುವ ಜನರನ್ನು ಹುಡುಕು</string>
|
<string name="nearby_splash__find_people_button">ನನ್ನ ಹತ್ತಿರವಿರುವ ಜನರನ್ನು ಹುಡುಕು</string>
|
||||||
<string name="system_install_installing">ಅನುಸ್ಥಾಪಿಸಲಾಗುತ್ತಿದೆ…</string>
|
<string name="system_install_installing">ಅನುಸ್ಥಾಪಿಸಲಾಗುತ್ತಿದೆ…</string>
|
||||||
<string name="system_install_button_install">ಅನುಸ್ಥಾಪಿಸು</string>
|
<string name="system_install_button_install">ಅನುಸ್ಥಾಪಿಸು</string>
|
||||||
<string tools:ignore="UnusedResources" name="category_Time">ಸಮಯ</string>
|
<string name="category_Time">ಸಮಯ</string>
|
||||||
<string tools:ignore="UnusedResources" name="category_Security">ಸುರಕ್ಷತೆ</string>
|
<string name="category_Security">ಸುರಕ್ಷತೆ</string>
|
||||||
<string tools:ignore="UnusedResources" name="category_Sports_Health">ಕ್ರೀಡೆ & ಆರೋಗ್ಯ</string>
|
<string name="category_Sports_Health">ಕ್ರೀಡೆ & ಆರೋಗ್ಯ</string>
|
||||||
<string tools:ignore="UnusedResources" name="category_Games">ಆಟಗಳು</string>
|
<string name="category_Games">ಆಟಗಳು</string>
|
||||||
<string name="wifi">ವೈ-ಫೈ</string>
|
<string name="wifi">ವೈ-ಫೈ</string>
|
||||||
<string name="pref_language">ಭಾಷೆ</string>
|
<string name="pref_language">ಭಾಷೆ</string>
|
||||||
<string name="repo_name">ಹೆಸರು</string>
|
<string name="repo_name">ಹೆಸರು</string>
|
||||||
|
@ -26,8 +26,14 @@ for d in sorted(glob.glob(os.path.join(resdir, 'values-*'))):
|
|||||||
header = ''
|
header = ''
|
||||||
with open(str_path, 'r') as f:
|
with open(str_path, 'r') as f:
|
||||||
header = f.readline()
|
header = f.readline()
|
||||||
tree = ElementTree.parse(str_path)
|
|
||||||
root = tree.getroot()
|
# handling XML namespaces in Python is painful, just remove them, they
|
||||||
|
# should not be in the translation files anyway
|
||||||
|
with open(str_path, 'rb') as fp:
|
||||||
|
contents = fp.read()
|
||||||
|
contents = contents.replace(b' tools:ignore="UnusedResources"', b'') \
|
||||||
|
.replace(b' xmlns:tools="http://schemas.android.com/tools"', b'')
|
||||||
|
root = ElementTree.fromstring(contents)
|
||||||
|
|
||||||
for e in root.findall('.//string'):
|
for e in root.findall('.//string'):
|
||||||
name = e.attrib['name']
|
name = e.attrib['name']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user