akhilkedia / AllTrans

Completely Translate Android apps in-place aka Google translate in Chrome
Other
403 stars 32 forks source link

Translation doesn't fit defined character limit #2

Closed james-s-w-clark closed 4 years ago

james-s-w-clark commented 7 years ago

In one app, the buttons display at most 6 characters. Hence, some translated words do not display correctly. Would it be possible to: A) remove the character limit, and to prevent text being too long either: 1) limit the text to reaching the outside of the borders of the box 2) change the font size (dynamically?) to fit the new word into the space (in density independent pixels, dps) limit.

akhilkedia commented 7 years ago

Alltrans already does this for DrawText (which is enabled in Agressive Mode), but I think I forgot to do this in the normal mode (when I'm hooking SetText). Thanks for pointing this out, I'll do it in the next release.

akhilkedia commented 4 years ago

Latest update pushed to github solves this issue - Long text will now scroll (marquee). I have a branch with dynamically resizing the text, but for some languages the text post translation is much longer, and the resized text has to be too small to fit. Hence the scrolling choice. Will push update xposed repo version soon.