Share duration is always shown in English #2867
yidazhang99
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've installed filebrowser in my server and my native language is Traditional Chinese. I found out that the zh-tw.json file is missing some items as well as missing some translations for some existing items. I've done modifying the file and after I build the front end with this file, the translation is ALMOST complete.
The reason why I say it's ALMOST complete is that the share duration is still showing the duration in English for all the languages when viewing shares.
I was able to allocate the code where this piece of information was generated and it's in the 223rd line of the file ./frontend/src/components/prompts/share.vue. The line reads "return moment(time * 1000).fromNow();", but the moment function needs a line of setting locale before this line. For example, a line like "moment.locale('zh-tw');"
I'm not sure if this line could be added easily for that I don't know if the locale setting is available in this file or not, and if available, how could one refer to it. Plus, I guess there are two locale settings, one is for the whole site and one is for logged in user. I believe the one for user should be referred at this place.
Is there anyone could help allocate the problem and solve it? Or just let me know how to fix it?
I'm attaching my modified version of zh-tw.json so that anyone having he same need would have at least what I have achieved so far.
zh-tw.json
Beta Was this translation helpful? Give feedback.
All reactions