forked from bot/app
Merge pull request #62 from ElapsingDreams/main
🌐 liteyuki_weather i18n (虽然仅支持三种语言)
This commit is contained in:
commit
36a39e1ed7
@ -55,6 +55,15 @@ def get_local_data(ulang_code: str) -> dict:
|
|||||||
"day" : ulang.get("weather.day"),
|
"day" : ulang.get("weather.day"),
|
||||||
"night" : ulang.get("weather.night"),
|
"night" : ulang.get("weather.night"),
|
||||||
"no_aqi" : ulang.get("weather.no_aqi"),
|
"no_aqi" : ulang.get("weather.no_aqi"),
|
||||||
|
"now-windVelocity" : ulang.get("weather.now-windVelocity"),
|
||||||
|
"now-humidity" : ulang.get("weather.now-humidity"),
|
||||||
|
"now-feelsLike" : ulang.get("weather.now-feelsLike"),
|
||||||
|
"now-precip" : ulang.get("weather.now-precip"),
|
||||||
|
"now-pressure" : ulang.get("weather.now-pressure"),
|
||||||
|
"now-vis" : ulang.get("weather.now-vis"),
|
||||||
|
"now-cloud" : ulang.get("weather.now-cloud"),
|
||||||
|
"astronomy-sunrise" : ulang.get("weather.astronomy-sunrise"),
|
||||||
|
"astronomy-sunset" : ulang.get("weather.astronomy-sunset"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,3 +10,12 @@ weather.night=Night
|
|||||||
weather.today=Today
|
weather.today=Today
|
||||||
weather.tomorrow=Tomorrow
|
weather.tomorrow=Tomorrow
|
||||||
weather.no_aqi=No AQI data
|
weather.no_aqi=No AQI data
|
||||||
|
weather.now-windVelocity=WS
|
||||||
|
weather.now-humidity=RH
|
||||||
|
weather.now-feelsLike=FL
|
||||||
|
weather.now-precip=PPT
|
||||||
|
weather.now-pressure=MSLP
|
||||||
|
weather.now-vis=VIS
|
||||||
|
weather.now-cloud=CC
|
||||||
|
weather.astronomy-sunrise=SR
|
||||||
|
weather.astronomy-sunset=SS
|
@ -10,3 +10,12 @@ weather.night=夜
|
|||||||
weather.today=今日
|
weather.today=今日
|
||||||
weather.tomorrow=明日
|
weather.tomorrow=明日
|
||||||
weather.no_aqi=空気質データなし
|
weather.no_aqi=空気質データなし
|
||||||
|
weather.now-windVelocity=風速
|
||||||
|
weather.now-humidity=湿度
|
||||||
|
weather.now-feelsLike=体感温度
|
||||||
|
weather.now-precip=降水量
|
||||||
|
weather.now-pressure=気圧
|
||||||
|
weather.now-vis=能視距離
|
||||||
|
weather.now-cloud=雲量
|
||||||
|
weather.astronomy-sunrise=日出
|
||||||
|
weather.astronomy-sunset=日没
|
@ -10,3 +10,12 @@ weather.night=夜晚
|
|||||||
weather.today=今天
|
weather.today=今天
|
||||||
weather.tomorrow=明天
|
weather.tomorrow=明天
|
||||||
weather.no_aqi=暂无AQI数据
|
weather.no_aqi=暂无AQI数据
|
||||||
|
weather.now-windVelocity=风矢
|
||||||
|
weather.now-humidity=湿度
|
||||||
|
weather.now-feelsLike=体感
|
||||||
|
weather.now-precip=降水
|
||||||
|
weather.now-pressure=气压
|
||||||
|
weather.now-vis=能见
|
||||||
|
weather.now-cloud=云量
|
||||||
|
weather.astronomy-sunrise=日出
|
||||||
|
weather.astronomy-sunset=日落
|
@ -71,15 +71,15 @@ for (let id in templates) {
|
|||||||
|
|
||||||
let subtemplates = {
|
let subtemplates = {
|
||||||
"now-windDirect": weatherNow["now"]["windDir"] + " " + weatherNow["now"]["wind360"] + "°",
|
"now-windDirect": weatherNow["now"]["windDir"] + " " + weatherNow["now"]["wind360"] + "°",
|
||||||
"now-windVelocity": "风矢 " + weatherNow["now"]["windScale"] + "级 " + weatherNow["now"]["windSpeed"] + "km/h",
|
"now-windVelocity": localData["now-windVelocity"] + " " + weatherNow["now"]["windScale"] + "级 " + weatherNow["now"]["windSpeed"] + "km/h",
|
||||||
"now-humidity": "湿度 " + weatherNow["now"]["humidity"] + "%",
|
"now-humidity": localData["now-humidity"] + " " + weatherNow["now"]["humidity"] + "%",
|
||||||
"now-feelsLike": "体感 " + weatherNow["now"]["feelsLike"] + "°C",
|
"now-feelsLike": localData["now-feelsLike"] + " " + weatherNow["now"]["feelsLike"] + "°C",
|
||||||
"now-precip": "降水 " + weatherNow["now"]["precip"] + "mm",
|
"now-precip": localData["now-precip"] + " " + weatherNow["now"]["precip"] + "mm",
|
||||||
"now-pressure": "气压 " + weatherNow["now"]["pressure"] + "hPa",
|
"now-pressure": localData["now-pressure"] + " " + weatherNow["now"]["pressure"] + "hPa",
|
||||||
"now-vis": "能见 " + weatherNow["now"]["vis"] + "km",
|
"now-vis": localData["now-vis"] + " " + weatherNow["now"]["vis"] + "km",
|
||||||
"now-cloud": "云量 " + (weatherNow["now"]["cloud"] == "" ? "无数据" : (weatherNow["now"]["cloud"] + "%")),
|
"now-cloud": localData["now-cloud"] + " " + (weatherNow["now"]["cloud"] == "" ? "无数据" : (weatherNow["now"]["cloud"] + "%")),
|
||||||
"astronomy-sunrise": "日出 " + get_time_hour(weatherAstronomy["sunrise"]),
|
"astronomy-sunrise": localData["astronomy-sunrise"] + " " + get_time_hour(weatherAstronomy["sunrise"]),
|
||||||
"astronomy-sunset": "日落 " + get_time_hour(weatherAstronomy["sunset"])
|
"astronomy-sunset": localData["astronomy-sunset"] + " " + get_time_hour(weatherAstronomy["sunset"])
|
||||||
}
|
}
|
||||||
|
|
||||||
let subiconMap = {
|
let subiconMap = {
|
||||||
|
Loading…
Reference in New Issue
Block a user