Conversation
| ids = Array.from(ids) | ||
| var featuredIds = ids.slice(-4).reverse() | ||
|
|
||
| if (ids.length) { |
There was a problem hiding this comment.
hey @gmarcos87, did you know intl-messageformat which i used in patch-intl, has syntax for plural messages? https://formatjs.io/guides/message-syntax/#plural-format
There was a problem hiding this comment.
you should be able to pass in a second argument to format which is an object of values you can reference in the translation templates.
i tried to set this up, but didn't really test it. so, does it not work for you? |
|
by the way, this is awesome! |
| assignedDescriptionTo : "assigned a description to", | ||
| subscribedTo : "subscribed to", | ||
| unsubscribedFrom : "unsubscribed from" | ||
| }; |
There was a problem hiding this comment.
From a developer perspective it would be nice if these key/values were "sorted". Just my 2 cents :)
There was a problem hiding this comment.
They are in the order they appear in the code, to make the extraction easier. In the next pull I order them. Thank you!
| writeMessageChannel : "Write a message in this channel\n\n\n\nPeople who follow you or subscribe to this channel will also see this message in their main feed.\n\nTo create a new channel, type the channel name (preceded by a #) into the search box above. e.g #cat-pics", | ||
| writePrivate : "Write a private reply", | ||
| writePublic : "Write a public reply", | ||
| cannotLoadThead : "Cannot load thead", |
There was a problem hiding this comment.
Should probably be cannotLoadThread: "Cannot load thread"?
|
|
||
| api.sbot.async.get(id, (err, value) => { | ||
| if (err) return result.set(h('div', {className: 'Error'}, ['Cannot load thead'])) | ||
| if (err) return result.set(h('div', {className: 'Error'}, [format('cannotLoadThead')])) |
patchwork/pull/485/commits/e9cd1866e71358295790fabd3ad823b05e1f59a5
|
hey @gmarcos87, this is looking great. what's the status on this pull request? is there anything your blocked on, or something you want help with? |
|
I have a busy week of work and not be able to make changes in the code. I'm sorry, maybe the next week would work on it. |
|
@gmarcos87 no worries, take care of yourself. 😸 |
|
Ok, I'm back. I updated pull request #527 to the current master code. You can see de code in https://github.com/gmarcos87/patchwork/tree/i18n-reload. I extract the strings of the different screens and add the Spanish language. The automatic detection of language and the "moment" configuration are pending. I'm really interested in getting a multi-language version. I want to propose the use in my community and not all speak English. |
|
we should really get one of these merged, I think it's better to use depject, but it should be simple to convert @dangerousbeans's approach to depject |
|
Close in favor of #632 |
#485