Comments (16)
Hi,
I am looking at this issue and try my best to solve it as soon as possible.
Thanks
from cinnamon-spices-desklets.
@slgobinath, @Ilis
Hi guys! I found sort of solution about days and months localization.
The local must be set into /lib/xdate.js You must add few strings in the end of the file. My localization is bulgaria, so my locale is 'bg':
XDate.locales['bg'] = {
monthNames: ['Януари','Февруари','Март','Април','Май','Юни','Юли','Август','Септември','Октомври','Ноември','Декември'], // long month names, startet from january
monthNamesShort: ['Яну.','Фев.','Мрт','Апр','Май','Юни','Юли.','Авг','Сеп.','Окт.','Ное.','Дек.'], // short month names, startet from january
dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], // long day names, started from sunday
dayNamesShort: ['Нед.','Пнд.','Втр.','Срд.','Чет.','Пет.','Сбт.'] // short day names, started from sunday
};
XDate.defaultLocale = 'bg'; // set new default locale.
So, this work for me, but i dont know how this shout be applied into desklet and pot files...
from cinnamon-spices-desklets.
I have a solution for this. I'll create a PR.
from cinnamon-spices-desklets.
It didn't work. Months names are still in English.
Maybe .po and .pot have to be updated?
from cinnamon-spices-desklets.
@Ilis
Yes .pot has to be updated and the new Strings have to be translated.
from cinnamon-spices-desklets.
@NikoKrause please check my new PR #259 in which I have improved your code. (pot file also updated)
This PR also fixes alignment issues.
from cinnamon-spices-desklets.
I've updated ru_po in #263, but noticed that string for shortened month name May is missed.
from cinnamon-spices-desklets.
The problem is in English May
is used for both short and long names. I did not think about it.
I will fix it soon.
from cinnamon-spices-desklets.
@slgobinath is right. It's the same string for both.
How to know, which string to translate how?
Not sure if this will work, but there should be something similar for applets: https://stackoverflow.com/questions/10235822/same-string-with-different-translation
from cinnamon-spices-desklets.
https://github.com/search?q=org%3Alinuxmint+pgettext&type=Code
from cinnamon-spices-desklets.
Hi @NikoKrause,
Is there a way to test desklet locale without changing system locale?
from cinnamon-spices-desklets.
I don't know of any way.
from cinnamon-spices-desklets.
Hi,
Since I am unable to test, could you please try the solution provided in the Stack Overflow Answer using this method: Gettext.dpgettext
I think we need to replace _("May")
in xdate.js
by Gettext.dpgettext(UUID, "short", "May")
and Gettext.dpgettext(UUID, "long", "May")
PO file should be:
msgctxt "short"
msgid "May"
msgstr ""
msgctxt "long"
msgid "May"
msgstr ""
Modified xdate.js is attached here:
xdate.js.zip
from cinnamon-spices-desklets.
May is not a problem in Russian (Май stands both for full and shortened names, as in English)
But e. g. for Ukrainian it is not true:
№ | Месяц | Сокр. | Translation |
---|---|---|---|
1 | Січень | Сiч. | Jan |
2 | Лютий | Лют. | Feb |
3 | Березень | Бер. | Mar |
4 | Квітень | Квiт. | Apr |
5 | Травень | Трав. | May |
6 | Червень | Черв. | Jun |
7 | Липень | Лип. | Jul |
8 | Серпень | Серп. | Aug |
9 | Вересень | Вер. | Sep |
10 | Жовтень | Жовт. | Oct |
11 | Листопад | Лист. | Nov |
12 | Грудень | Груд. | Dec |
from cinnamon-spices-desklets.
I have tried:
Gettext.dpgettext(UUID, "short", "May")
and Gettext.dpgettext(UUID, "long", "May")
and it works
from cinnamon-spices-desklets.
Please accept my apologies for the delay.
@NikoKrause thank you very much for testing the solution. This solution has been implemented in #399
from cinnamon-spices-desklets.
Related Issues (20)
- quoteOfTheDay@tinnu: Have an option to make the quote in a fixed size
- hostcheck@schorschii causes stutter HOT 11
- Desklet Bug HOT 2
- yarr@jtoberling: Stuck at "Loading: feeds", desklet blank as of latest Cinnamon version (6.0.4) on LMDE 6 HOT 3
- Erroneous reporting of failing connection HOT 8
- [email protected]: Feature Request HOT 124
- binaryclock2@euxneks - Desklet Feature Request For Vertical Pips
- [email protected]: Feature Request Open-Meteo API HOT 2
- clock@schorschii: Label not showing up HOT 5
- TimeAndDate@nightflame Feature Request: time and date on one line HOT 2
- hostcheck@schorschii: Accumulation ping process HOT 2
- clock@schorschii: Feature Request HOT 5
- Desklet Bug: Yahoo Finance Quotes disappeared after shutdown HOT 6
- Yahoo Finance Quotes - setting personal font size HOT 4
- Yahoo Finance Quotes - setting stock's purchase values HOT 1
- hostcheck@schorschii
- simple-system-monitor@ariel: curious default width in Cinnamon 5.8+ HOT 4
- Feature Request: battery@schorschii HOT 1
- calendar@deeppradhan : translation problem HOT 1
- system-monitor-graph@rcassani : disk name disappears after restarting HOT 2
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 cinnamon-spices-desklets.