Skip to content

Single quote character must be escaped in strings.xml #54

@pdalfarr

Description

@pdalfarr

First, thanks a lot for this great plugin: amazing :-)

Please select the affected platforms

  • N/A

Please select the translator to use

  • N/A

Version of Plugin and IDE

  • Plugin Version: 2.5.0
  • IDE Version: Android Studio Bumblebee | 2021.1.1 Patch 2

Issue details

Translation result containing single quote characters should contain 'escaped single quote'.
Full list of 'special characters' which need to be escpaed is availalbe here: https://developer.android.com/guide/topics/resources/string-resource#escaping_quotes .
(single quote, double quotes, etc...)

Example:

English source
<string name="contacts_select_contact_fragment_text_hint">I enter the name of the contact here</string>

French result (when using this plugin):
<string name="contacts_select_contact_fragment_text_hint">J'entre le nom du contact ici</string>

which is not correct.
Instead of "j'entre", we should have "j\'entre" because single quote must be escaped in strings.xml.
Result should be:
<string name="contacts_select_contact_fragment_text_hint">J\'entre le nom du contact ici</string>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions