-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bot strings language localization #19
Comments
This is good. We could also create a task in each core plugin to create a pool of easy to complete plugin issues as it's not a hard task to add the param and extract error and common strings, what do you think? |
I would again keep it simple and add custom strings to the core plugins only when we really need them :) This issue is more of a reminder for plugin developers that plugin users might want to customize some of the text messages. |
/start |
Tips:
|
Wouldn't it be more handy to use a |
If we use a file then how does a partner customize the strings for their install? I think ideally, we'd make the config item optional so that it's not a requirement to define customStrings. Then if the partner wants a non-english version they can simply add their string in whatever language they choose. |
A partner can host their file and point towards it in the configuration too. I just think it will be inconvenient to have a configuration full of strings, and it is very easy to make typos and not have the content work properly. If there are like < 5 strings it's fine I suppose, but above it will clutter quickly. |
I guess default values should be provided in cases a string is missing in the config. So partners will have to "clutter" the config with custom strings only when they need to rewrite them.
I agree this approach is way easier (basically web2 approach) but it's not clear where to host those translation files for all plugins that partners would use. Overall it's more of a product related question. @0x4007 Do the bot's plugins need to support different languages for output text strings (i.e. the ones that the bot replies in github comments)? |
I don't think supporting other languages is a priority in the near future. Besides, modern browsers all have translation built in. |
What if we simply add a new config param like |
There should be a mic drop emoji
I expected that 9/10 the defaults would have been used anyway but yeah that's what thought too, all strings would naturally have our defaults applied.
Agreed large plugins could end up messy if they decided they wanted to customize every string
Very much agreed plus with modern browsers supporting translation maybe it's not as important here as it is on telegram for example |
@whck6 Sorry for the inconvenience, pls check the updated issue description |
@rndquu It should be an optional parameter, am I right? |
If you mean whether the |
|
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1 | 50 |
Issue | Comment | 1 | 0 |
Review | Comment | 6 | 0 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@rndquu It should be an optional parameter, am I right? | 0content: p: symbols: \b\w+\b: count: 10 multiplier: 0 score: 1 multiplier: 0 | 0.9 | - |
Signed-off-by: Wenhao Ho <[email protected]> Resolves #19 … | 0content: p: symbols: \b\w+\b: count: 11 multiplier: 0 score: 1 a: symbols: \b\w+\b: count: 4 multiplier: 0 score: 1 ul: symbols: \b\w+\b: count: 45 multiplier: 0 score: 1 li: symbols: \b\w+\b: count: 35 multiplier: 0 score: 1 multiplier: 0 | 0.3 | - |
@rndquu You're right. so? https://raw.githubusercontent.com/ubiq… | 0content: p: symbols: \b\w+\b: count: 15 multiplier: 0.2 score: 1 multiplier: 0 | 1 | - |
@rndquu I assume the format could be like it, what do you think?… | 0content: p: symbols: \b\w+\b: count: 13 multiplier: 0.2 score: 1 pre: symbols: \b\w+\b: count: 4 multiplier: 0.2 score: 0 code: symbols: \b\w+\b: count: 4 multiplier: 0.2 score: 1 multiplier: 0 | 1 | - |
Yes, it is. | 0content: p: symbols: \b\w+\b: count: 3 multiplier: 0.2 score: 1 multiplier: 0 | 1 | - |
FYI. [here](https://github.com/ubiquibot/plugin-template/issues/… | 0content: p: symbols: \b\w+\b: count: 2 multiplier: 0.2 score: 1 a: symbols: \b\w+\b: count: 1 multiplier: 0.2 score: 1 multiplier: 0 | 1 | - |
@rndquu Do you mind helping to review? | 0content: p: symbols: \b\w+\b: count: 7 multiplier: 0.2 score: 1 multiplier: 0 | 1 | - |
[ 11.04 WXDAI ]
@Keyrxng
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 3 | 11.04 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
This is good. We could also create a task in each core plugin … | 4.4content: p: symbols: \b\w+\b: count: 44 multiplier: 0.1 score: 1 multiplier: 1 | 0.7 | 3.08 |
If we use a file then how does a partner customize the strings f… | 5.6content: p: symbols: \b\w+\b: count: 56 multiplier: 0.1 score: 1 multiplier: 1 | 0.9 | 5.04 |
There should be a mic drop emoji I expected that 9/10 the defau… | 7.3content: p: symbols: \b\w+\b: count: 73 multiplier: 0.1 score: 1 multiplier: 1 | 0.4 | 2.92 |
[ 94.97 WXDAI ]
@rndquu
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Specification | 1 | 33.6 |
Issue | Comment | 5 | 57.62 |
Review | Comment | 7 | 3.75 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
Original comment: https://github.com/ubiquibot/command-start-sto… | 33.6content: p: symbols: \b\w+\b: count: 43 multiplier: 0.1 score: 1 a: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 5 ul: symbols: \b\w+\b: count: 67 multiplier: 0.1 score: 0 li: symbols: \b\w+\b: count: 59 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 5 pre: symbols: \b\w+\b: count: 57 multiplier: 0.1 score: 0 multiplier: 3 | 1 | 33.6 |
I would again keep it simple and add custom strings to the core … | 8.4content: p: symbols: \b\w+\b: count: 42 multiplier: 0.2 score: 1 multiplier: 1 | 0.5 | 4.2 |
`i18n` is not quite fit with the plugins: - How should … | 51content: p: symbols: \b\w+\b: count: 8 multiplier: 0.2 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.2 score: 1 ul: symbols: \b\w+\b: count: 136 multiplier: 0.2 score: 1 li: symbols: \b\w+\b: count: 110 multiplier: 0.2 score: 1 multiplier: 1 | 0.7 | 35.7 |
@Keyrxng @gentlementlegen What if we simply add a new config p… | 11.2content: p: symbols: \b\w+\b: count: 55 multiplier: 0.2 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.2 score: 1 multiplier: 1 | 1 | 11.2 |
@whck6 Sorry for the inconvenience, pls check the updated issue … | 2.2content: p: symbols: \b\w+\b: count: 11 multiplier: 0.2 score: 1 multiplier: 1 | 0.2 | 0.44 |
If you mean whether the `customStringsUrl` parameter sho… | 7.6content: p: symbols: \b\w+\b: count: 35 multiplier: 0.2 score: 1 code: symbols: \b\w+\b: count: 3 multiplier: 0.2 score: 1 multiplier: 1 | 0.8 | 6.08 |
@whck6 Overall looks good, pls add a real example of `json&#… | 0.4content: p: symbols: \b\w+\b: count: 15 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 0.4 |
Why don't we pass a real `json` file here from the https… | 0.5content: p: symbols: \b\w+\b: count: 19 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 0.5 |
Keep `configurableResponse` untouched, it should serve a… | 1.25content: p: symbols: \b\w+\b: count: 49 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 1.25 |
Pls create and use a real file hosted in https://github.com/ubiq… | 0.375content: p: symbols: \b\w+\b: count: 15 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 0.375 |
Yes, the format could be (example): ```json { "… | 0.425content: p: symbols: \b\w+\b: count: 6 multiplier: 0.1 score: 1 pre: symbols: \b\w+\b: count: 11 multiplier: 0.1 score: 0 code: symbols: \b\w+\b: count: 11 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 0.425 |
Is there a way to use a single/unified instance of `logger.e… | 0.525content: p: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 20 multiplier: 0.1 score: 1 pre: symbols: \b\w+\b: count: 20 multiplier: 0.1 score: 0 multiplier: 0.25 | 1 | 0.525 |
I think it's fine, it's just for demo purposes | 0.275content: p: symbols: \b\w+\b: count: 11 multiplier: 0.1 score: 1 multiplier: 0.25 | 1 | 0.275 |
[ 15.28 WXDAI ]
@gentlementlegen
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 2 | 10.38 |
Review | Comment | 2 | 4.9 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
Wouldn't it be more handy to use a `i18n` package direct… | 6.2content: p: symbols: \b\w+\b: count: 61 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 multiplier: 1 | 0.9 | 5.58 |
A partner can host their file and point towards it in the config… | 6content: p: symbols: \b\w+\b: count: 60 multiplier: 0.1 score: 1 multiplier: 1 | 0.8 | 4.8 |
Maybe it would make more sense to default this to the `strin… | 1.6content: p: symbols: \b\w+\b: count: 14 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 2 multiplier: 0.1 score: 1 multiplier: 1 | 1 | 1.6 |
With this logic, it seems that when `customStringsUrl` i… | 3.3content: p: symbols: \b\w+\b: count: 32 multiplier: 0.1 score: 1 code: symbols: \b\w+\b: count: 1 multiplier: 0.1 score: 1 multiplier: 1 | 1 | 3.3 |
[ 0.44 WXDAI ]
@0x4007
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 1 | 0.44 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
I don't think supporting other languages is a priority in the ne… | 2.2content: p: symbols: \b\w+\b: count: 22 multiplier: 0.1 score: 1 multiplier: 1 | 0.2 | 0.44 |
Original comment: ubiquity-os-marketplace/command-start-stop#25 (comment)
There may be cases when partner would need to customize the plugin's text response to some commands.
Possible use cases:
It could be useful to keep a separate
json
file of used strings in the plugin repository. This way plugin developers would hostjson
file in the plugin's repo while partners would be able to customize the whole "text strings" file without cluttering the config too much.Example config with a new param
customStringsUrl
:So as a part of this issue we should add a basic plugin config and an example usage of the
customStringsUrl
param so that future plugin developers could fork this repo and use configurable text messages instead of hardcoding them in the code.The text was updated successfully, but these errors were encountered: