You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a bunch of strings on Weblate that say "Note = "Placeholder - Do not translate";", for example Base.lproj/MainStoryboard.storyboard///1tR-eI-DSh.configuration.title. Please remove them so I don't have to click past them to check for new things to translate and so that 100% translated will actually mean 100% translated.
The text was updated successfully, but these errors were encountered:
As mentioned towards the end of #742 we don't have an easy way to do this currently, because there's no way in Xcode to mark a string as not needing localization. And as far as I'm aware there's no way to mark a string in XLIFF as read-only. The current approach is to do a bulk-edit of the Weblate database adding flag:read-only to strings with note:"Placeholder - Do not translate"
I guess a better solution is to have a script that runs after exporting XLIFFs that searches each one for the "Placeholder" text and then deletes the surrounding string.
I tried to fix it using the script below. Unfortunately it breaks things:
Quotemarks (") get replaced with "
	 gets changed to a tab character.
Miscellaneous other encoding conversions.
#!/usr/bin/python3
# Look though an xliff file and delete translation units that contain Note = Placholder
import sys, os
from xml.dom.minidom import parse
filename = sys.argv[1]
document = parse(filename)
tag = "Note = \"Placeholder -".lower()
# print(tag)
notes = document.getElementsByTagName("note")
for note in notes:
child = note.firstChild
if child != None:
value = child.nodeValue
if tag in value.lower():
# print(value)
# Remove the parent
transUnit = note.parentNode
body = transUnit.parentNode
body.removeChild(transUnit)
print(document.toprettyxml(indent=" ",newl=""))
There are a bunch of strings on Weblate that say "Note = "Placeholder - Do not translate";", for example
Base.lproj/MainStoryboard.storyboard///1tR-eI-DSh.configuration.title
. Please remove them so I don't have to click past them to check for new things to translate and so that 100% translated will actually mean 100% translated.The text was updated successfully, but these errors were encountered: