poeditor-android-gradle-plugin icon indicating copy to clipboard operation
poeditor-android-gradle-plugin copied to clipboard

Add unescapeHtmlTags flag and bump dependencies

Open adriangl opened this issue 3 years ago • 5 comments

Github issue (delete if this does not apply)

Resolves #52

PR's key points

The PR adds a new flag to toggle HTML unescaping from strings.

Groovy
poEditor {
    apiToken = "your_api_token"
    projectId = 12345
    defaultLang = "en"
    unescapeHtmlTags = false
}
Kotlin
poEditor {
    apiToken = "your_api_token"
    projectId = 12345
    defaultLang = "en"
    unescapeHtmlTags = false
}

How to review this PR?

Check that the flag works as expected.

Definition of Done

  • [x] Changes summary added to CHANGELOG.md
  • [x] Documentation added to README.md (if a new feature is added)
  • [x] Tests added (if new code is added)
  • [x] There is no outcommented or debug code left

adriangl avatar Jul 15 '22 22:07 adriangl

Hi @apoi!

Sorry for the long delay! Could you please test that this version of the plugin works for your use case with the new flag?

classpath "com.github.hyperdevs-team:poeditor-android-gradle-plugin:feature~unescape-html-tags-flag-SNAPSHOT"

Thanks!

adriangl avatar Jul 15 '22 22:07 adriangl

Hi @adriangl, thanks a lot for implementing this! I'm currently on holidays without access to the codebase so testing will be a bit delayed. I'll get back to this in about two weeks.

apoi avatar Jul 23 '22 12:07 apoi

Sure, no worries! Just let me know if it works when you can test it ;)

adriangl avatar Jul 28 '22 12:07 adriangl

Thanks for your patience @adriangl, I was able to test the change now. The flag is recognized but doesn't change the output. Could it be because the unescaping is additionally done at file writing time, in Document.toAndroidXmlString()?

apoi avatar Aug 18 '22 09:08 apoi

Hi @apoi! Sorry for the late reply. Do you have any sample string that I can add to a PoEditor project to verify how the plug-in is behaving? Do the tests added at XmlPostProcessorTest.kt (lines 94 to 103) match your issue?

adriangl avatar Sep 18 '22 10:09 adriangl

Hello @apoi @adriangl do you have any update about this PR ?

I tested and changed the Document.toAndroidXmlString to add the unescapeHtmlTags flag and it's working as expected for me.

keytronic avatar Jan 06 '23 08:01 keytronic

Hello, any news about this feature coming on master?

justodepp avatar Mar 08 '23 15:03 justodepp

Hello, any news about this feature coming on master?

Hi @justodepp! Sorry for the delay, I've been trying to wrap my head around how to do this properly (I mean, the proposed solution by @keytronic would work, but I was trying to find a more elegant solution, maybe at XML level). I have to take a look at this, and if I don't find any proper solution, I'll leave the one mentioned in the comments.

adriangl avatar Mar 20 '23 12:03 adriangl

Hi @apoi, @keytronic, @justodepp! Can you test this version and verify that the new flag works as expected for your use cases? I've finally left the suggestion mentioned in the comments, as I didn't see any other way to do it, unfortunately.

classpath "com.github.hyperdevs-team:poeditor-android-gradle-plugin:f10ac7b094"

adriangl avatar Mar 20 '23 14:03 adriangl