Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Forgot to add support to translating weather condition labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Schmalfeldt committed Feb 25, 2018
1 parent 1b67507 commit 78d6f14
Show file tree
Hide file tree
Showing 11 changed files with 752 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Feels from 'feels'
import moment from 'moment-timezone'

import { i18n as $t } from '../translations/i18n'
import { scaleQuantize } from 'd3-scale'
import { getTimes, getPosition, getMoonPosition, getMoonIllumination } from 'suncalc'
import * as tzlookup from 'tz-lookup'
Expand Down Expand Up @@ -480,7 +481,7 @@ const parseWeather = (key, data, settings) => {
let weather = {
city: data.name,
condition_icon: (time === 'night' && (code === 800 || code === 951)) ? getMoonPhaseIcon() : getWeatherIcon(code, time),
condition_label: titleCase(data.weather[0].description),
condition_label: $t(settings.app_language, `weather.code_${code}`),
id: data.id,
hash_key: key,
moon_angle: moon.angle,
Expand Down
75 changes: 75 additions & 0 deletions src/translations/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,81 @@ export default {
website: 'موقع الكتروني'
}
}
},
weather: {
code_200: 'عاصفة رعدية مع المطر الخفيف',
code_201: 'عاصفة رعدية مع المطر',
code_202: 'عواصف رعدية مع هطول أمطار غزيرة',
code_210: 'عاصفة رعدية خفيفة',
code_211: 'عاصفة رعدية',
code_212: 'عاصفة رعدية ثقيلة',
code_221: 'رعد عاصفة رعدية',
code_230: 'عاصفة رعدية مع رذاذ ضوء',
code_231: 'عاصفة رعدية مع رذاذ',
code_232: 'عاصفة رعدية مع رذاذ الثقيلة',
code_300: 'رذاذ شدة الضوء',
code_301: 'رذاذ',
code_302: 'رذاذ كثافة كثيفة',
code_310: 'رذاذ شدة الضوء المطر',
code_311: 'رذاذ المطر',
code_312: 'رذاذ كثافة كثيفة المطر',
code_313: 'دش المطر والرذاذ',
code_314: 'دش المطر الشديد والرذاذ',
code_321: 'دش رذاذ',
code_500: 'ضوء المطر',
code_501: 'معتدل المطر',
code_502: 'الكثافة الشديدة المطر',
code_503: 'الأمطار الثقيلة جدا',
code_504: 'المطر المتطرف',
code_511: 'المطر المتجمد',
code_520: 'ضوء شدة دش المطر',
code_521: 'دش المطر',
code_522: 'شدة الكثافة دش المطر',
code_531: 'المطر دش المطر',
code_600: 'ضوء الثلج',
code_601: 'سنو',
code_602: 'الثلج الثقيل',
code_611: 'سليت',
code_612: 'دش سليت',
code_615: 'ضوء المطر والثلوج',
code_616: 'المطر والثلج',
code_620: 'ضوء دش سنو',
code_621: 'دش سنو',
code_622: 'دش كثيف سنو',
code_701: 'ضباب',
code_711: 'الدخان',
code_721: 'الضباب',
code_731: 'الرمال، دودة الغبار',
code_741: 'الضباب',
code_751: 'الرمل',
code_761: 'الغبار',
code_762: 'الرماد البركاني',
code_771: 'سكوالز',
code_781: 'تورنادو',
code_800: 'مسح السماء',
code_801: 'قليل الغيوم',
code_802: 'الغيوم المتناثرة',
code_803: 'الغيوم المكسورة',
code_804: 'الغيوم الملبدة',
code_900: 'تورنادو',
code_901: 'العاصفة الاستوائية',
code_902: 'إعصار',
code_903: 'الباردة',
code_904: 'حار',
code_905: 'عاصف',
code_906: 'حائل',
code_951: 'الهدوء',
code_952: 'نسيم خفيف',
code_953: 'نسيم لطيف',
code_954: 'نسيم متوسط',
code_955: 'نسيم طازج',
code_956: 'نسيم قوي',
code_957: 'الرياح العالية، بالقرب من غيل',
code_958: 'غيل',
code_959: 'عاصفة شديدة',
code_960: 'العاصفة',
code_961: 'عاصفة عنيفة',
code_962: 'إعصار'
}
}
}
75 changes: 75 additions & 0 deletions src/translations/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,81 @@ export default {
website: 'Webseite'
}
}
},
weather: {
code_200: 'Gewitter mit leichtem Regen',
code_201: 'Gewitter mit Regen',
code_202: 'Gewitter mit starkem Regen',
code_210: 'Leichter Gewitter',
code_211: 'Gewitter',
code_212: 'Schweres Gewitter',
code_221: 'Ragged Thunderstorm',
code_230: 'Gewitter mit leichtem Nieselregen',
code_231: 'Gewitter mit Drizzle',
code_232: 'Gewitter mit starkem Nieselregen',
code_300: 'Lichtintensität Drizzle',
code_301: 'Drizzle',
code_302: 'Schwerer Nieselregen',
code_310: 'Lichtintensität Drizzle Rain',
code_311: 'Drizzle Regen',
code_312: 'Schwerer Nieselregen',
code_313: 'Dusche Regen und Nieselregen',
code_314: 'Heavy Shower Regen und Drizzle',
code_321: 'Dusche Drizzle',
code_500: 'Leichter Regen',
code_501: 'Mäßiger Regen',
code_502: 'Schwerer Intensitätsregen',
code_503: 'Sehr starker Regen',
code_504: 'Extremer Regen',
code_511: 'Einfrierender Regen',
code_520: 'Lichtintensität Duschregen',
code_521: 'Dusche Regen',
code_522: 'Starkintensiver Duschregen',
code_531: 'Ragged Shower Regen',
code_600: 'Leichter Schnee',
code_601: 'Schnee',
code_602: 'Schwerer Schnee',
code_611: 'Schneeregen',
code_612: 'Dusche Sleet',
code_615: 'Leichter Regen und Schnee',
code_616: 'Regen und Schnee',
code_620: 'Leichter Duschschnee',
code_621: 'Dusche Schnee',
code_622: 'Heavy Shower Schnee',
code_701: 'Nebel',
code_711: 'Rauch',
code_721: 'Haze',
code_731: 'Sand, Staubwirbel',
code_741: 'Nebel',
code_751: 'Sand',
code_761: 'Staub',
code_762: 'Vulkanasche',
code_771: 'Sturmböen',
code_781: 'Tornado',
code_800: 'Klarer Himmel',
code_801: 'Wenige Wolken',
code_802: 'Streuwolken',
code_803: 'Gebrochene Wolken',
code_804: 'Bewölkte Wolken',
code_900: 'Tornado',
code_901: 'Tropischer Sturm',
code_902: 'Hurrikan',
code_903: 'Kalt',
code_904: 'Heiß',
code_905: 'Windig',
code_906: 'Heil',
code_951: 'Ruhe',
code_952: 'Leichte Brise',
code_953: 'sanfte Brise',
code_954: 'Moderate Brise',
code_955: 'Frische Brise',
code_956: 'Starke Brise',
code_957: 'Starker Wind, nahe dem Sturm',
code_958: 'Sturm',
code_959: 'Starker Sturm',
code_960: 'Sturm',
code_961: 'heftiger Sturm',
code_962: 'Hurrikan'
}
}
}
75 changes: 75 additions & 0 deletions src/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,81 @@ export default {
website: 'Website'
}
}
},
weather: {
code_200: 'Thunderstorm with Light Rain',
code_201: 'Thunderstorm with Rain',
code_202: 'Thunderstorm with Heavy Rain',
code_210: 'Light Thunderstorm',
code_211: 'Thunderstorm',
code_212: 'Heavy Thunderstorm',
code_221: 'Ragged Thunderstorm',
code_230: 'Thunderstorm with Light Drizzle',
code_231: 'Thunderstorm with Drizzle',
code_232: 'Thunderstorm with Heavy Drizzle',
code_300: 'Light Intensity Drizzle',
code_301: 'Drizzle',
code_302: 'Heavy Intensity Drizzle',
code_310: 'Light Intensity Drizzle Rain',
code_311: 'Drizzle Rain',
code_312: 'Heavy Intensity Drizzle Rain',
code_313: 'Shower Rain and Drizzle',
code_314: 'Heavy Shower Rain and Drizzle',
code_321: 'Shower Drizzle',
code_500: 'Light Rain',
code_501: 'Moderate Rain',
code_502: 'Heavy Intensity Rain',
code_503: 'Very Heavy Rain',
code_504: 'Extreme Rain',
code_511: 'Freezing Rain',
code_520: 'Light Intensity Shower Rain',
code_521: 'Shower Rain',
code_522: 'Heavy Intensity Shower Rain',
code_531: 'Ragged Shower Rain',
code_600: 'Light Snow',
code_601: 'Snow',
code_602: 'Heavy Snow',
code_611: 'Sleet',
code_612: 'Shower Sleet',
code_615: 'Light Rain and Snow',
code_616: 'Rain and Snow',
code_620: 'Light Shower Snow',
code_621: 'Shower Snow',
code_622: 'Heavy Shower Snow',
code_701: 'Mist',
code_711: 'Smoke',
code_721: 'Haze',
code_731: 'Sand, Dust Whirls',
code_741: 'Fog',
code_751: 'Sand',
code_761: 'Dust',
code_762: 'Volcanic Ash',
code_771: 'Squalls',
code_781: 'Tornado',
code_800: 'Clear Sky',
code_801: 'Few Clouds',
code_802: 'Scattered Clouds',
code_803: 'Broken Clouds',
code_804: 'Overcast Clouds',
code_900: 'Tornado',
code_901: 'Tropical Storm',
code_902: 'Hurricane',
code_903: 'Cold',
code_904: 'Hot',
code_905: 'Windy',
code_906: 'Hail',
code_951: 'Calm',
code_952: 'Light Breeze',
code_953: 'gentle Breeze',
code_954: 'Moderate Breeze',
code_955: 'Fresh Breeze',
code_956: 'Strong Breeze',
code_957: 'High Wind, Near Gale',
code_958: 'Gale',
code_959: 'Severe Gale',
code_960: 'Storm',
code_961: 'violent Storm',
code_962: 'Hurricane'
}
}
}
75 changes: 75 additions & 0 deletions src/translations/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,81 @@ export default {
website: 'Sitio web'
}
}
},
weather: {
code_200: 'Tormenta con lluvia ligera',
code_201: 'Tormenta con lluvia',
code_202: 'Tormenta con lluvia fuerte',
code_210: 'Light Thunderstorm',
code_211: 'Thunderstorm',
code_212: 'Heavy Thunderstorm',
code_221: 'Tormenta Ragged',
code_230: 'Tormenta con ligera llovizna',
code_231: 'Tormenta con llovizna',
code_232: 'Tormenta con fuerte llovizna',
code_300: 'Llovizna de intensidad ligera',
code_301: 'Drizzle',
code_302: 'Drizzle de Intensidad',
code_310: 'Light Intensity Drizzle Rain',
code_311: 'Llovizna',
code_312: 'Heavy Intensity Drizzle Rain',
code_313: 'Lluvia y llovizna',
code_314: 'Heavy Shower Rain y Drizzle',
code_321: 'Shower Drizzle',
code_500: 'Light Rain',
code_501: 'Moderate Rain',
code_502: 'Heavy Intensity Rain',
code_503: 'Very Heavy Rain',
code_504: 'Extreme Rain',
code_511: 'lluvia helada',
code_520: 'Light Intensity Shower Rain',
code_521: 'Shower Rain',
code_522: 'Lluvia de lluvia intensa',
code_531: 'Ragged Shower Rain',
code_600: 'Light Snow',
code_601: 'Snow',
code_602: 'Heavy Snow',
code_611: 'Sleet',
code_612: 'Shower Sleet',
code_615: 'Light Rain and Snow',
code_616: 'Rain and Snow',
code_620: 'Snow Shower Snow',
code_621: 'Shower Snow',
code_622: 'Heavy Shower Snow',
code_701: 'Mist',
code_711: 'Humo',
code_721: 'Haze',
code_731: 'Sand, Dust Whirls',
code_741: 'Niebla',
code_751: 'Sand',
code_761: 'Dust',
code_762: 'Ash volcánico',
code_771: 'Squalls',
code_781: 'Tornado',
code_800: 'Clear Sky',
code_801: 'Pocas Nubes',
code_802: 'Clouds dispersas',
code_803: 'Broken Clouds',
code_804: 'Nubes nubladas',
code_900: 'Tornado',
code_901: 'Tormenta tropical',
code_902: 'Hurricane',
code_903: 'Frio',
code_904: 'Hot',
code_905: 'Windy',
code_906: 'Ave.',
code_951: 'Calma',
code_952: 'Light Breeze',
code_953: 'suave Breeze',
code_954: 'Moderate Breeze',
code_955: 'Fresh Breeze',
code_956: 'Strong Breeze',
code_957: 'Viento fuerte, cerca de Gale',
code_958: 'Gale',
code_959: 'Severe Gale',
code_960: 'Storm',
code_961: 'Tormenta violenta',
code_962: 'Hurricane'
}
}
}
Loading

0 comments on commit 78d6f14

Please sign in to comment.