QuestPatcher icon indicating copy to clipboard operation
QuestPatcher copied to clipboard

Replace Strings with Localizable Resources

Open qe201020335 opened this issue 10 months ago • 2 comments

Using localizable resources allows others to properly localize the app without replacing string in a fork.

  • [x] Extract and replace static strings in layout files
  • [x] Extract and replace dynamic strings from code
  • [x] Add an option to change language

I tried to put the new resource files in the Assets folder, but it didn't work, so I had to create a new folder for them.

image

qe201020335 avatar Apr 15 '24 07:04 qe201020335

~~I will squash the small commits later~~ Squashed

qe201020335 avatar Apr 15 '24 07:04 qe201020335

I think I have extracted all the strings. There could be some that I have missed

qe201020335 avatar Apr 16 '24 06:04 qe201020335

Heya, getting round to this now, sorry for the delay.

Lauriethefish avatar Jul 01 '24 07:07 Lauriethefish

Currently attempting to find a workaround to refresh the UI without restarting the app. It seems changing theme does the trick but that's a bit too jank for my liking.

Lauriethefish avatar Jul 01 '24 08:07 Lauriethefish

Seems there's no way to do it because StaticResources have no event handler because they're, well, static. We could make them dynamic resources but that would use more memory, so I think a restart is a good compromise for now.

Lauriethefish avatar Jul 01 '24 08:07 Lauriethefish

Now lgtm, awaiting build

Lauriethefish avatar Jul 01 '24 08:07 Lauriethefish