chronogolf / nativescript-store-update

Apache License 2.0
19 stars 13 forks source link

Allow editing of dialog messages #14

Closed sitefinitysteve closed 6 years ago

sitefinitysteve commented 6 years ago

Afaik I don't think we can set the messages since they're hardcoded into the /src localized json files?

Could we do one of the following

jeremypele commented 6 years ago

Hi @sitefinitysteve,

We could imagine passing the messages through the options and fallback to the i18n files if none provided 👍

Feel free to propose a P.R if you have time :)

sitefinitysteve commented 6 years ago

Yeah can do, just wanted to run it by you guys to see how you'd want it handled?

SBats commented 6 years ago

Agree with @jeremypele to begin with we could think of passing translations in options (with a translation property containing all overridden languages)

sitefinitysteve commented 6 years ago

What about both, pass in direct text overrides, OR pass in an option to set the .json path so they could optionally load from a local path instead of hardcoded (just the pathing) https://github.com/chronogolf/nativescript-store-update/blob/master/src/helpers/locales.helper.ts#L6-L7

sitefinitysteve commented 6 years ago

OR... and this just occurred to me now at midnight.

Why overcomplicate, why not:

...now the user can just (if they need it) locally add the nativescript-i18n plugin, and pass those values into this plugins options.

SBats commented 6 years ago

In fact, you just made me realize I didn't update the README. For now, we removed the i18n plugin as we weren't able to make it work with our plugin. So yeah don't put i18n as a dependency and the user can pass translations to the plugin through the config as he/she wish. (Could be a js object, a require of a custom json file, or i18n values).

sitefinitysteve commented 6 years ago

Great, I'm on it :)

On Oct 18, 2017 9:45 AM, "Simon Bats" notifications@github.com wrote:

In fact, you just made me realize I didn't update the README. For now, we removed the i18n plugin as we weren't able to make it work with our plugin. So yeah don't put i18n as a dependency and the user can pass translations to the plugin through the config as he/she wish. (Could be a js object, a require of a custom json file, or i18n values).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chronogolf/nativescript-store-update/issues/14#issuecomment-337595507, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeI6EY78AxmDWmKD-nKW4BxT7_CPdNaks5stgELgaJpZM4P8t-D .

SBats commented 6 years ago

Closed by #16