![]() |
Updated strings.xml files to single-line format - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Updated strings.xml files to single-line format (/showthread.php?tid=8069) |
- slacker - 2004-12-09 i've updated the 8-dec-2004 cvs strings.xml files for all languages so they follow the single-line format that's been in use lately for new strings. it should help a lot in readability as well as in text compare operations between the different languages. it didn't take me that long to do (i used macro operations for most of it), so if it's not picked up i won't complain. this: <strings> <string> <id>0</id> <value>my programs</value> </string> <string> <id>1</id> <value>my pictures</value> </string> now looks like this: <strings> <string><id>0</id><value>my programs</value></string> <string><id>1</id><value>my pictures</value></string> from the readme.txt in the patch: below are the unix-style regex patterns i used, in the following order. i used ultraedit-32 to edit them, but the patterns should work with any regex editor. the original files are still present and have been renamed to strings.xml.bak. i verified that english worked, and it also opens correctly in internet explorer 6. other notes: - croatian and serbian had a misplaced </strings> tag just after string id 438. fixed. - german (austria) did not parse correctly after string id 13305 due to differences in white spaces and formatting. i hand-edited it rather than write a new regex pattern. - the following languages had only one or two lines that did not parse, so i hand-edited them as well: italian, japanese, polish - norwegian had lots of comments, hand-edited all string ids with comments embedded. - turkish and one other language were already in single-line format, but needed indenting. /// reformat all strings to a single line each (<string>)\s*\p\s*(<id>\d*</id>)\s*\p\s*(<value>.*</value>)\s*\p\s*(</string>)\s*\p \1\2\3\4\p /// remove all indentations since they aren't uniform \p\s*<string> \p<string> /// re-indent all the strings with a depth of two spaces \p<string> \p <string> /// remove any remaining empty lines-- re-run this until there are no matches found \p\p \p /// remove any remaining lines with nothing but white space-- re-run this until there are no matches found \p\s*\p \p - slacker - 2004-12-09 patch was sent to xbmc upload site and sf patch section. also, this patch does *not* include the english strings.xml changes made in my other patch submission for adding password protection to shares. that way this can be integrated before the password one, and the new strings in the password patch are already in single-line format so they'll be easy to move over once integrated. - jmarshall - 2004-12-09 thanks slacker - will look into it tonight with any luck (and will also start looking over the password patch) |