Closed the-saddest-clown closed 1 year ago
Hello, it is not specific to curl, same behaviour using Firefox.
Obviously not a curl problem yeah. Same when visiting https://wttr.in/Paris on ungoogled-chromium with french as default locale. However forcing english language https://wttr.in/Paris?lang=en display the units correctly, still on ugoogled-chromium. So there is a problem regarding the french translation of wttr.in, at least the way it is supposed to display the units. I looked in the code for something that may be modified but cannot find it otherwise I woul like to help improving it.
Similar observation: I don't get any units for wttr.in/hamburg or wttr.in/hamburg?lang=de . Can only see units if I set ?lang=en.
Not a problem - still love it. Just wanted to notify :)
Can confirm the issue. Units also disappear when using other ways of providing localization.
For Example:
bash.function recommendation in Spanish:
curl -fGsS -H "Accept-Language: es" --data-urlencode 0m --compressed "wttr.in/Barcelona"
using country subdomain in German:
curl de.wttr.in/Berlin
switching to imperial units doesn't matter:
curl de.wttr.in/Berlin?0u
I've tested all officially supported locale params according to current output of :help
result. Interestingly some countries seem to get units. The accuracy of this test is not 100%, but close enough for an approximate esteem. Result shows every country code followed by units found, if any:
#! /usr/bin/env bash
for country in am ar af be bn ca da de el et fr fa hi hu ia id it lt mg nb nl oc pl pt-br ro ru ta tr th uk vi zh-cn zh-tw;
do
echo "Result for ${country}:"
curl -s ${country}.wttr.in/Berlin?T0 | grep -E "[0-9]{1,2} \w{2}"
done
Result:
Result for am:
Result for ar:
Result for af:
Result for be:
\_( ). ↘ 15 км/г
/(___(__) 10 км
1.2 мм
Result for bn:
Result for ca:
Result for da:
Result for de:
Result for el:
Result for et:
Result for fr:
Result for fa:
Result for hi:
Result for hu:
Result for ia:
Result for id:
Result for it:
Result for lt:
Result for mg:
Result for nb:
Result for nl:
Result for oc:
Result for pl:
Result for pt-br:
Result for ro:
Result for ru:
\_( ). ↘ 15 км/ч
/(___(__) 10 км
1.2 мм
Result for ta:
Result for tr:
\_( ). ↘ 15 km/sa
Result for th:
Result for uk:
\_( ). ↘ 15 км/год
/(___(__) 10 км
1.2 мм
Result for vi:
Result for zh-cn:
Result for zh-tw:
So only country codes be, ru, tr and uk get at least some unit decorations. All other country codes behave as described by previous reporters. Therefore @the-saddest-clown you may consider to remove "french translation" from issue title. This appears to be a more general bug.
wttr.in is an awesome application and I'd love to see this bug fixed. Sadly I don't see myself capable of contributing to the code base. That's above my skill level, I am afraid to admit.
EDIT: I've also did the test with all "unsupported" country codes and none of them receives unit decorations. Just mentioning it to complete all available country codes.
Currently unsupported codes are: az bg bs cy cs eo es eu fi ga hi hr hy is ja jv ka kk ko ky lv mk ml mr nl fy nn pt pt-br sk sl sr sr-lat sv sw te uz zh zu he in case anyone wants to run above for-loop
with these.
The problem is fixed now. Please test if it works for you
@chubin thx mate - that's a lot better. Fixed for all aforementioned country codes.
git-bash
users still may have some issues with Arabic characters on a standard English windows installation. That's not an issue of your application though. I am just mentioning it for completion.
I think it depends on the terminal configuration. There are some known problems with RTL scripts indeed. But that's true, the problem is not related to this issue.
Great that the problem with the units is fixed now.
When running![no_units](https://user-images.githubusercontent.com/83234199/174437444-97bc9661-1c70-46ff-a6f0-48029f9ef13d.png)
curl fr.wttr.in/Paris
orcurl wttr.in/Paris?lang=fr
the output don't show units (Km/h, Km, mm except temperature °C).However running![units](https://user-images.githubusercontent.com/83234199/174437556-ea568ccb-79f6-464f-8eaf-06587b13cf7d.png)
curl wttr.in/paris
shows all the unitsLinux Mint 20.3 "Una" Xfce.