Comments (3)
I agree with the remarks:
- Label versioning should be available
- We should have a simple option to setup all the messages in the code (and keep the ability to override the labels in the interface) - may be ressource bundle ?
from tock.
I am not too sure about ResourceBundle
, since - as far as I know - we have no good way of listing defined locales. We would need that feature to write the default values to the database for use in TOCK Studio.
from tock.
After further consideration, Java's ResourceBundle
API is technically usable, as we have the full list of locales supported by each bot. However, it has the following limitations:
- Since TOCK would have to query the bundle for each locale, it would need to also take the bundle key as parameter (so 2 parameters, bundle key and resource key)
- Locales cannot naturally express interface types (text, voice and text, voice) or connectors (web, slack, etc.). We could however work around that by defining a new convention for an "interface" and a "connector" language subtags.
- Property resource bundles can only yield strings, not lists of strings as would be required to support the "alternatives" feature
ResourceBundle
forces the creation of a new file for each locale, which may not be practical for developers that wish to modularize their localization (e.g. grouping translations per-story)
Since TOCK will have to extract something like a Map<(Locale, UserInterfaceType, Connector), List<String>>
at some point regardless, I believe we should make it possible for programs to supply such data directly. We can then provide a ResourceBundle-based helper on top for applications that benefit from its use.
from tock.
Related Issues (20)
- [Tock Studio] obfuscation of error messages
- Test Bot is giving "technical error :( ]" error on demo HOT 2
- create endpoint for health check HOT 1
- Scenarios Management menu is not visible HOT 2
- Try to run code without docker giving Unresolved reference: TranslatorEngine
- [Tock Studio] Creation date missing in sentences data export
- [CAS] pac4j upgrade to 6.0.1 breaking changes (CasClient & Config.sessionStore) HOT 1
- Missing property description in OAuth configuration
- Allow custom directory for vert.x upload file system
- [WhatsApp Cloud] Add corrections to the builder, message webhooks, and other WhatsApp Cloud components
- mark incorrect answers
- random crash issue at startup when mongo is slow
- Bug - High latency at the creation of a new story taht contains with many elements HOT 2
- [Web Connector] CORS rules are too lenient
- [NLP-model] Integrate bgem3 model
- [WhatsApp Cloud] Add a solution to the WhatsApp Cloud payload character limitation
- [Translator] Deepl integration
- Exception in thread "main" com.github.salomonbrys.kodein.Kodein$OverridingException: Binding bind<CredentialsProvider>() with ? { ? } must override an existing binding.
- [WhatsApp Cloud] Add corrections bug in carousel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tock.