Translation for MiuiGallery Collage function


Trần Anh

Members
Aug 6, 2014
307
67
Hi @Igor Eisberg and @ingbrzy
By default, this function is almost full of Chinese, sorry I forgot taking screenshot. You may try by select some picture, and then tap Creativity, and then Collage

I've look at MiuiGallery assets and find a way to translate
First, look at assets/collage/poster/mode
One collage mode contain image imageElementModels or textElementModels in main.json. I noticed that each element is array
I converted imageElement to textElement (keep only x, y and locationType from imageElement), and it work
After that, I compared with MiuiGallery from global ROM and it translated same way (I wish I had compared it earlier, It took me about 30mins of trying to change json)


textElement have text, which can take string resource for display. Some string is already in strings.xml (because global has this mode), some not
Here is some mode I changed to translate, could you review and make some patch for xiaomi.eu ROMs. Thanks
https://drive.google.com/file/d/1Xj4fHe9zGp3nRtoIDdQYPAm8exGXjlT1/view?usp=sharing

Here is screenshot after translated
Screenshot_2019-03-28-11-46-47-453_com.miui.gallery.png
 
  • Like
Reactions: maksz