-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use LocalizationService instead of ui.Text #39
Comments
Thanks for highlighting this @bjarnef looks like I need to get onto this at some point then. Will it be backwards compatible do we know? |
@warrenbuckley I am not sure how it will be backwards compatible - if it doesn't handle that, I think we could check for the Umbraco version? I guess Shannon knows 👍 |
You can still use ui.Text... it is backward compatible, just deprecated. It actually calls into LocalizationService.Text ... It would be impossible to make something new backward compatible btw unless i had a time machine :) |
Okay, I was just wondering if LocalizationService.Text had fallback for earlier version of Umbraco 7, which just used ui.Text. |
No, if you use new APIs that don't exist in previous versions it would never work. We cannot create 'fallback' APIs for ones that don't exist already :P |
So should we stick to ui.Text or check for the Umbraco version if switching to the new API? |
You can either keep using ui.Text for now for your packages, or you can do some compat checks in your packages or you can release different versions of your packages for different umbraco versions, or you can make your package dependent on certain versions of Umbraco (i.e. Articulate will make you use the latest Umb version normally... that is the way that I am supporting that project). In v8, ui.Text will not exist. |
@bjarnef let me know on what approach you want to adopt. As obviously in current version we do a lot of work of merging of keys into lang files on app startup, but should I do a version check if newer than 7.3, use the lovely auto lang key merge in 7.3 thats now available & continue to use ui.Text?? Or do we make latest version breaking changes & dependant on latest version of Umbraco? |
@warrenbuckley I am thinking maybe do a check if newer than 7.3 .. and then maybe at the same time do a check if it should use the new LocalizationService.Text, if lower than 7.3 use ui.Text? Then maybe later for a major version of Analytics only support Umbraco 7.3+ ... or what do you think? |
Not sure to be honest & little busy at the moment to do anything about it. So if you have an idea & want to implement it in a PR then go for it. But until I can find/make some time for this I won't get a chance to look at it currently, so feel free to decide. |
ui.Text is deprecated, so we should use LocalizationService.
https://twitter.com/Shazwazza/status/613986522631667712
The text was updated successfully, but these errors were encountered: