Skip to content
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

Holiday translation ignored from holiday_descriptions_de.properties #135

Closed
int5749 opened this issue Mar 2, 2020 · 9 comments
Closed

Comments

@int5749
Copy link

int5749 commented Mar 2, 2020

Hi all,
I've added Christmas_eve as personal holiday to my holiday-de.xml and this is working perfectly and even more it's translated properly from holiday_descriptions_de.properties

But I've added few more personal holidays and like to continue with English in XML to have it common. Therefore I've added proper translation to holiday_descriptions_de.properties which is ignored. Is this already known issue and are you working on Solution?

@svendiedrichsen
Copy link
Owner

@int5749 It's pretty impossible to advise anything if I can't see what you have done. As you have already stated translations are generally picked up properly. Did you try to debug to see where this fails?

@int5749
Copy link
Author

int5749 commented Mar 2, 2020

@svendiedrichsen thanks for very prompt action
Unfortunately I have no idea how to debug further as it's my names are simply not looked up.
My entry in *.xml
<tns:FixedWeekdayRelativeToFixed which="FIRST" weekday="SUNDAY" when="BEFORE" descriptionPropertiesKey="FOURTH_ADVENT" localizedType="OFFICIAL_HOLIDAY"> <tns:day month="DECEMBER" day="25"/> </tns:FixedWeekdayRelativeToFixed>
Entry to holiday_descriptions_de.properties
holiday.description.FOURTH_ADVENT = 4. Advent
This seems to be equal to the other entries.

So FOURTH_ADVENT is returned properly when using
logInfo("Test", "Vierter {}", Ephemeris.getBankHolidayName((new DateTimeType("2021-12-2019").zonedDateTime), '<myPath>/holidays_de.xml'))

But I didn't get value from
logInfo("Test", "vorher: {} und nachher: {}", Ephemeris.getBankHolidayName((new DateTimeType("2020-12-20").zonedDateTime), '<myPath>/holidays_de.xml'), Ephemeris.getHolidayDescription(Ephemeris.getBankHolidayName((new DateTimeType("2020-12-20").zonedDateTime), '<myPathY/holidays_de.xml')))

Returns

20:27:42.667 [INFO ] [g.eclipse.smarthome.model.script.Test] - vorher: FOURTH_ADVENT und nachher: undefined

Hope this helps?

@svendiedrichsen
Copy link
Owner

The first thiing I see is that you don't work with Jollyday on its own but you are using some software which uses Jollyday. That way I can't tell whats going on. I can only advise you to construct an example without anything else but Jollyday and see if it gets picked up. Your software may contain some other description properties file which gets picked up before the one you are using. or the other way around depending on which properties file you are modifying.

@svendiedrichsen
Copy link
Owner

svendiedrichsen commented Mar 2, 2020

Or you might want to ask this question at the project of the software you are using. They may be more qualified to answer why your changed properties file does not get picked up. In the end it all comes down to the order in which the classpath provides the properties files.

@int5749
Copy link
Author

int5749 commented Mar 2, 2020

@svendiedrichsen I thought this project integrates this funktion into OpenHab? Am I wrong? Than for sure I should raise this question to OpenHab Community/Git

@svendiedrichsen
Copy link
Owner

@int5749 This project is only responsible for the Jollyday library. Integration of Jollyday is done by project which uses it.

@int5749
Copy link
Author

int5749 commented Mar 2, 2020

@svendiedrichsen OK, than apologies to bother you and I will contact OpenHab Git ;-)

@int5749 int5749 closed this as completed Mar 2, 2020
@svendiedrichsen
Copy link
Owner

No problem. At least I could help with some directions. ;-)

@svendiedrichsen
Copy link
Owner

svendiedrichsen commented Mar 2, 2020

@int5749 Following this implementation https://github.com/openhab/openhab-core/blob/master/bundles/org.openhab.core.ephemeris/src/main/java/org/openhab/core/ephemeris/internal/EphemerisManagerImpl.java it could be that OpenHAB is not using the german locale as you would expect. Maybe you could check that the german locale is really in use there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants