phrase-cli icon indicating copy to clipboard operation
phrase-cli copied to clipboard

Android string-array isn't supported

Open giangpham96 opened this issue 3 months ago • 3 comments

Hi,

It seems like Android's string-array isn't supported. When I have an array defined as

    <string-array name="key">
        <item>item 1</item>
        <item>item 2</item>
    </string-array>

and do phrase push. It appears on Phrase in the following format

---
- item 1
- item 2

and when I do phrase pull. The array got synced but overridden into a string instead

    <string name="key">---
- item 1
- item 2
</string>

Is this a bug or does Phrase intentionally doesn't support this use case?

giangpham96 avatar Sep 26 '25 07:09 giangpham96

looking at the code, we should support it both ways. at which point exactly your key changes from type "array" to type "string"? you can see that in Phrase Editor, in the section "Meta" on the right.

jablan avatar Sep 26 '25 07:09 jablan

Right after I do phrase push. The meta switches to string instead of array

giangpham96 avatar Sep 26 '25 07:09 giangpham96

I couldn't reproduce it by uploading android XML with an array key. can you perhaps record a screencast? (you don't need to use phrase push, you can also upload from the Phrase UI).

jablan avatar Sep 26 '25 08:09 jablan