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

How to launch temps-lite #1

Closed
papioara opened this issue Feb 4, 2021 · 16 comments
Closed

How to launch temps-lite #1

papioara opened this issue Feb 4, 2021 · 16 comments

Comments

@papioara
Copy link
Collaborator

papioara commented Feb 4, 2021

Hello,
I think most users (I already got some help from you, and so I am fine) might want to have more concise instructions about how to launch temps-lite.
Putting scapps into my temps-lite folder did the trick. When it is in there, on launching scapps temps-lite opens. So in all, this is not very complicated, but maybe packing both up into a single program would even appeal more to the average user, I would expect.

And one other thing: are there already other languages than English availabe? I am fine with English, but some would maybe appreciate if other languages would be available. I offer to do the German translation if you like and if you could tell me how to go about it. I am not a programmer, but if there is a helper program for localization I could use, the job should not be difficult. And there is not that much text either.

@GirkovArpa GirkovArpa pinned this issue Feb 4, 2021
@GirkovArpa
Copy link
Owner

GirkovArpa commented Feb 5, 2021

Thanks for the offer! The latest release has support for English & Spanish. If you'd like to share a translation, you can use spanish.json as an example. list.json would also need to be updated. For animations to function under new languages, the words for "light" and "heavy" must be added manually to lines 110 and 112 of api-high-level.tis. It depends on what words the API uses, but you needn't worry about those. I can track them down if you aren't sure.

By the way, if any native Spanish speakers catch any mistakes, feel free to make a pull request with corrections.

maybe packing both up into a single program would even appeal more to the average user, I would expect.

I completely agree. Unfortunately I am not familiar with Linux, and don't have a computer running it. Somehow Quark still lets me package for Linux. I will upload the result but I am unable to update the metadata (icon and version info), or test it to confirm it even works.

P.S. Translations for months and weekdays will be supported in an upcoming version of Sciter. The functionality is currently bugged.

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Hi,

I have taken a look at both spanish.json and list.json, translated them plus saved the translated spanish.json as german.json. That was no hard work ;-)

As for api-high-level.tis I have a question: the two words there (heavy and light): do they relate to weather or to the weight of a font for instance? In German you would use different words, and we do not want nonsense to show up in the GUI after all...

Ah, and a second question: "Show weather in Menu Bar": do you actually mean Temps (which in French also means weather), or is it really the weather outside?

Thanks for enlightenment...

As for Linux: when you have packaged something for Linux, just notify me, and I will test it on my machine. I also have one other computer with a different distro on it (a Mac mini btw) for testing stuff, so I could help a bit with testing Linux versions.

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Second reply:

I have edited the files you mentioned according to your instructions and I have done a test run of temps-lite with the new files in my temps-lite folder.

It turns out that temps-lite does not work properly any more, and it is language-related. In the settings, I cannot choose a language any more now, neither Spanish nor German, and even with the API key entered, you only get 'unknown' and no weather. I cloned the actual repository one more time after renaming my edited temps-lite folder. Without any changes to it, that version works perfectly.

Is there anything else that would have to be changed? I will attach the three edited files to this message, so you can take a look at them also in order to speed things up.

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Hi again,

Success! Praise to the Terminal! I launched scapp in the terminal, and there was a complaint about bad syntax in lang.tis. I looked again, and lo and behold: I had forgotten to type one single opening bracket! I filled it in, and now temps-lite works in German as well. Cool! I could also do a Dutch and a French localization, because I speak these languages as well, and for the GUI of temps-lite, you do not need many words anyway. I'll go about it and send you the results after testing.

So long and have a nice day, wherever you are on the globe

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Yet another glitch found: whatever I set, be it 12h or 24h, temps-lite always shows 24h time. Celsius and Fahrenheit works. What could be the reason? You know your way through your code better, I guess...

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Hello again,

Hopefully the last one for today, but just for your info, if this tells you something. Launching scapp in the Terminal, I see these warnings:

(Temps-lite) BBB 05:03:42 $ scapp
warning:css: in @font-face statement, failed to install font at (file:///home/falter/Temps-lite/rubik.css(4))
warning:css: in @font-face statement, failed to install font at (file:///home/falter/Temps-lite/rubik.css(9))
warning:css: in @font-face statement, failed to install font at (file:///home/falter/Temps-lite/rubik.css(14))
warning:DOM: failed to load "/home/falter/Temps-lite/assets/iconTemplate@2x.png" file, error=2

(scapp:95456): GLib-CRITICAL **: 17:04:11.730: Source ID 805 was not found when attempting to remove it

(scapp:95456): GLib-CRITICAL **: 17:05:00.727: Source ID 3818 was not found when attempting to remove it

(scapp:95456): GLib-CRITICAL **: 17:07:55.156: Source ID 9473 was not found when attempting to remove it

(scapp:95456): GLib-CRITICAL **: 17:08:29.759: Source ID 16848 was not found when attempting to remove it

The file is in the assets folder, I have checked. Does it have something to do with rubik.css?

I'll send the modified files for French and Dutch later today

So long...

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Hello,

I have completed the localizations of temps-lite, and everything as far as languages are concerned, everthing is up and running. I have tested my work on my machine. What I did not test, is if temps-lite is fired up after login - hopefully it does. But there is a nice little icon in the menu bar with a small mouse-over tag. And as I already told you in a previous message, temps-lite does not care if you check 12h or 24h - it always displays 24h.

Please find attached the temps-lite folder as it is on my computer with everything in it plus scapp, so you can inspect what I have done. I am curious if you can find the source of the warnings from my system and the time format ignorance of temps-lite.

All the best

@papioara
Copy link
Collaborator Author

papioara commented Feb 7, 2021

Hello,

Another message from the translator's front: with the help of an Italian friend I have translated temps-lite into Italian as well. Now we have 5 languages together already. It was a lot of fun to help with these translations. Everything works ok - I have tested it on my machine.

Now there is a new requirement: we need German, Dutch, Italian and Spanish weekdays for the GUI to complete the consistency of the appearance. Is there any way of already entering them somewhere like the words triggering the animations. My guess would be something like after line 32 in lang.tis, but I will not mess around with it until you confirm or until you tell me something else.

I will attach my actual temps-lite folder as an archive once more so you can inspect it when you have time.

Hope to hear from you again and have a nice weekend

Hajo
Temps-lite.zip

@GirkovArpa
Copy link
Owner

GirkovArpa commented Feb 8, 2021

Fantastic work! Thank you. To be honest I only copied the text from the original, that's why it says "show weather in the taskbar", but it's quite convenient that even "show temps in the taskbar" would technically be correct since it shows the weather 😃

I did the Spanish translations with help from Linguee and putting Notepad3 into Spanish so I could use its menu as a reference. I noticed you removed the accents off of every occurence of dia. Assuming that was a glitch, I put them back 😄 Maybe I am mistaken.

Fortunately there is a way to avoid having to manually translate light and heavy based on the API documentation, so that is now implemented.

Regarding localizing the names of months and weekdays, Sciter actually supports that natively, so there shouldn't be any need for translations. I need to think about this for a bit though, since I am new to localization, but I will be sure to let you know when I fix this.

I need to see about fixing the clock format as well. And the font issue.

One last thing. The Italian translation for the text with the link to openweathermap is so long that it wraps to the next line and pushes the copyright notice halfway off the screen. I wonder if it possible to rephrase it more briefly, or if I should just reduce the font? But then it would be microsopic 🔍

Oh, one more "last" thing. The autostart with login is not working yet.

Update

Translation of month and weekday has been added. The abbreviation style isn't consistent with the how it was originally, but this will be fixed as soon as the next version of Sciter is released:

https://sciter.com/forums/topic/dayofweekname-is-wrong/#post-69684

@GirkovArpa
Copy link
Owner

temps-lite does not care if you check 12h or 24h - it always displays 24h.

Have you tried redownloading the latest version? I believe this commit was supposed to fix that.

@papioara
Copy link
Collaborator Author

papioara commented Feb 8, 2021

Yes, I just did having seen your last messages. I compared the latest version to what I have here on my machine, and the latest version shows either 12 or 24h format now. But there still is no localization for the months and weekdays, as one can easily see when you switch languages. The names always are in English regardless of the language of the GUI. There must be a way of implementing this, and it would make the appearance truly consistent with everything else.
Yes, I overlooked the accent on the i in día - you were right in putting it back.

@papioara
Copy link
Collaborator Author

papioara commented Feb 8, 2021

I now have made the ehtry in italian.json a one-liner: just paste this one into the temps-lite on GitHub:
Chiave de API gratuita de ... è necessario
This will fit :-)

@papioara
Copy link
Collaborator Author

papioara commented Feb 8, 2021

Last report: Comparing the two versions I have now on my computer I see another strange thing:

Latest version downloaded today: weekday probably English (German and English have the same abbreviation for Monday, though(, unabrigded month name German, day without trailing zero

My version from yesterday: weekday same as above, month name English, but abrigded: feb, day with trailing zero.

Behaviour never changes, no matter which language you set or where you look for weather information on the globe in both versions. What is going on in the background??
italian.json.zip

@GirkovArpa
Copy link
Owner

I see no problems on my end.

screenshot

After clicking Apply, your language and location changes are not applied?

What about the weekday names for the 4 forecaste days?

@papioara
Copy link
Collaborator Author

papioara commented Feb 8, 2021

Crazy... See the two screenschots with your animation and my temps window next to each other. Weekdays and month names never change regardless of the language. Apply clicked, of course...
And the time is shown differently, too. It is different in 12 or 24h mode, but there is no AM or PM.
How do you launch temps-lite? Are you on Windows? Maybe it has something to do with the OS? Or is there another commit in the meantime?

Auswahl_013
Auswahl_015

This was referenced Feb 9, 2021
@GirkovArpa
Copy link
Owner

Opening new issues for each particular one described here, for convenience.

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