Ra-Na/GTranslate-strings-xml

translation for <item> inside <string-array> in strings.xml file

Closed this issue · 7 comments

Hi R-Na, this py script is very helpful. Though it has only one drawback, it cannot translate inside the . I'm not familiar with python. So could you please add this functionality to the project.

Thanks in adv.

Example:
        
What can I look for in the Blog section?
Do I need to be signed in to view blogs?
Who contributes to Blogs?
Can I contribute to by writing articles?
Can I reach out to the article contributors directly?
How does an article or blog become a featured article?

Ra-Na commented

Can you be more explicit about the missing functionality? I do not understand inside what you want to translate.

Regards,

Rana

<string name="btn_search">Search</string> <string name="radio_design_ideas">Search in Design Ideas</string> <string-array name="search_title"> <item>What can I search for?</item> <item>Do I have to have an account to search and view information?</item> <item>How do I search for products shown in a design?</item> </string-array>

In the above code this s are automatically translated but s inside are left as it is

Ra-Na commented

Do I understand you correctly that only the strings in <string name=''...''></string> tags are translated, but you want also the strings between the <item></item> tags to get translated? See if you can upload an example XML file that has this problem.

Actually it is exactly the opposite.

<string name=''...''></string>
is working fine.

But
<string-array name="search_title"> <item>What can I search for?</item> </string-array>
is not working

Ra-Na commented

OK I will look into it. I see the issue now.

Ra-Na commented

OK it should work now. I tested it with the file teststrings.xml. Thanks for your input.

Thanks, it helped a lot. 👍 :)