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

Translation method #168

Closed
elcanux opened this issue Jun 11, 2019 · 10 comments
Closed

Translation method #168

elcanux opened this issue Jun 11, 2019 · 10 comments

Comments

@elcanux
Copy link

elcanux commented Jun 11, 2019

Hi,

I found the translation method quite complicated, everyone must modify its own configuration file, would not it be possible to use this method bellow ?

https://gitlab.com/ngulden/niculskin/blob/480c49442ede94c1c6e4f6ae2bd747e35e0d7f9f/bin/user/translategenerator.py

@olpayras
Copy link

Yes I used niculskin, this was quite easy. By the way the method used here is more flexible. You modify weewx.conf once, and even if you put a new realease of the skin, all isn't overwritten cause weewx.conf is kept.

We have some translation already done for master version. Which language are you looking for ?

@poblabs
Copy link
Owner

poblabs commented Jun 11, 2019

Hi thanks for the suggestion. In version 1.0 the translation went under a lot of work. You can read the 200 comments here: #104

For the same reason we do not have 5 different weewx.conf's, the idea is that every time I add or remove a label key I would have to add or remove it from 5 different language files. I add and remove these label keys very frequently right now. So this overhead is not one I'm looking to take on.

As @olpayras suggested, you can copy these label keys to your weewx.conf under the [Belchertown] skin configuration section as described here: https://github.com/poblabs/weewx-belchertown#translating-the-skin

@poblabs poblabs closed this as completed Jun 11, 2019
@elcanux
Copy link
Author

elcanux commented Jun 12, 2019

We have some translation already done for master version. Which language are you looking for ?

I am looking French translation.

@elcanux
Copy link
Author

elcanux commented Jun 12, 2019

For the same reason we do not have 5 different weewx.conf's, the idea is that every time I add or remove a label key I would have to add or remove it from 5 different language files. I add and remove these label keys very frequently right now. So this overhead is not one I'm looking to take on.

I started doing the translation in weewx.conf, but it's quite long when we do not know all the terms :)

Once the translation is over, it might be good to make available the part [Belchertown] translated into the wiki or file on the repository for new users

@poblabs
Copy link
Owner

poblabs commented Jun 12, 2019

I agree. Check in #104 there are Spanish and French versions posted there. It might be a little old though now that more options have been updated 😄

@HoracioDos
Copy link

Hello Pat. Spanish translation is always up to date
https://github.com/HoracioDos/weewx-belchertown/blob/master/skins/Belchertown/skin.conf.es

@olpayras
Copy link

olpayras commented Jun 12, 2019

For the same reason we do not have 5 different weewx.conf's, the idea is that every time I add or remove a label key I would have to add or remove it from 5 different language files. I add and remove these label keys very frequently right now. So this overhead is not one I'm looking to take on.

I started doing the translation in weewx.conf, but it's quite long when we do not know all the terms :)
Once the translation is over, it might be good to make available the part [Belchertown] translated into the wiki or file on the repository for new users

I should post one here, which release are you running ? You just have to modify one section in weewx.conf, not all the file have to be customized

@elcanux
Copy link
Author

elcanux commented Jun 12, 2019

I should post one here, which release are you running ? You just have to modify one section in weewx.conf, not all the file have to be customized

Belchertown skin version : | 1.0

@olpayras
Copy link

olpayras commented Jun 12, 2019

Here's [[[generic]]] section under [[[Labels]]] which contains major of the translation

         [[[[Generic]]]]
                barometer = Baromètre
                dewpoint = Point rosée
                ET = ET
                heatindex = Heat Index
                inHumidity = Humidité intérieure
                inTemp = T° Intérieur
                outHumidity = Humidité
                outTemp = Outside Temperature
                radiation = Radiation
                rain = Rain
                rainRate = Rain Rate
                UV = Index UV
                windDir = Wind Direction
                windGust = Gust Speed
                windGustDir = Gust Direction
                windSpeed = Wind Speed
                windchill = Wind Chill
                windgustvec = Gust Vector
                windvec = Wind Vector
                extraTemp1 = T° Bureau
                extraTemp2 = Temperature2
                extraTemp3 = T° Piscine
                
                # Sensor status indicators
                
                rxCheckPercent = Signal Quality
                txBatteryStatus = Transmitter Battery
                windBatteryStatus = Wind Battery
                rainBatteryStatus = Rain Battery
                outTempBatteryStatus = Outside Temperature Battery
                inTempBatteryStatus = Inside Temperature Battery
                consBatteryVoltage = Console Battery
                heatingVoltage = Heating Battery
                supplyVoltage = Supply Voltage
                referenceVoltage = Reference Voltage
                # Generic labels, keyed by an observation type.
                
                # To change a label or translate it to your language 
                # change the text after the equal sign.
                
                # Extra Observation labels
                
                appTemp = Température ressentie
                cloudbase = Base nuages
                visibility = Visibilité
                windrun = Vent
                
                # HTML Header Meta Tags and HTML Title. These labels have a default value
                # set inside of header.html.tmpl. Leave as "" to use the default value.
                
                html_title = Conditions météo
                html_description = Conditions météo observées par une station météo personnelle et le logiciel weewx
                
                # Footer Information
                
                footer_copyright_text = Mon site météo
                footer_disclaimer_text = Ne prenez jamais de décision importante basées sur les données de ce site.
                
                # Twitter Social Share
                
                twitter_text = Visitez mon site: Observations météorologiques
                twitter_owner = YourTwitterUsernameHere
                twitter_hashtags = "weewx #météo"
                
                # Station Observation Table
                
                rainWithRainRate = Précipitations
                
                # Navigation Menu
                
                nav_home = Accueil
                nav_graphs = Graphiques
                nav_records = Records
                nav_reports = Historique
                nav_about = A propos de...
                
                # Default page headers
                
                home_page_header = Conditions actuelles
                graphs_page_header = Observations graphiques
                records_page_header = Records
                reports_page_header = Rapports
                about_page_header = A Propos de ma station météo
                powered_by = Observations réalisées par une <a href="/about" target="_blank">station météo personelle</a>
                
                # DarkSky translations
                
                alert_in_effect = jusqu'au
                forecast_last_updated = Mise à jour le
                clear = Ensoleillé
                darksky_rain = Pluie
                snow = Neige
                sleet = Pluie/Neige
                windy = Vent
                fog = Brouillard
                overcast = Couvert
                partly_cloudy = Nuages épars
                hail = Grêle
                thunderstorm = Orage
                tornado = Tornade
                
                # Earthquake translations
                
                earthquake_no_data = Aucune donnée récente !
                
                # Home Page Text and Titles
                
                second = seconde, secondes
                minute = minute, minutes
                hour = heure, heures
                sun = Soleil
                moon = Lune
                sun_and_moon = Soleil & Lune
                moon_visible = visible
                daily_forecast = Prévision
                wind_speed = Vent
                wind_gust = Rafales
                feels_like = Ressenti
                highest_temperature = Haut
                lowest_temperature = Bas
                forecast_header = Prévision à 8 jours
                header_last_updated_alert = Attention : Cette page n'a pas été mise à jour récemment et peut contenir des données obsolètes !
                header_last_updated = Mise à jour le
                mqtt_websockets_connecting = Tentative de connexion à la station météo.
                mqtt_websockets_waiting = Connecté. En attente de données.
                mqtt_websockets_connected = Connecté à la station météo. Données reçues :
                mqtt_websockets_stopped = Mises à jour stoppées
                mqtt_websockets_continue = Actualiser
                mqtt_websockets_failed = Echec de connexion à la station météo. Veuillez essayer plus tard SVP!
                mqtt_websockets_lost = Connexion perdue à la station météo. Veuillez actualiser votre page SVP!
                weather_snapshots = Mini/Maxi du jour et du mois.
                weather_snapshots_link = Voir tous les records
                snapshot_high = Haut
                snapshot_low = Bas
                snapshot_today_high_wind = Vent le plus fort
                snapshot_today_high_uv = UV le plus elevé
                snapshot_today_rain = Précipitations aujourd'hui
                snapshot_today_rainrate = Précipitations taux
                snapshot_month_high_wind = Vent le plus fort
                snapshot_month_high_uv = UV le plus élevé
                snapshot_month_rain = Précipitations total
                snapshot_month_rainrate = Taux le plus élevé
                earthquake_title = Tremblement de terre le plus récent
                earthquake_magnitude = Magnitude
                homepage_graphs_link = Voir plus
                copyright = Copyright
                
                # Almanac Popup
                
                close = Fermer
                almanac_more_details = Plus de détails
                almanac_modal_title = Ephéméride
                sun_always_down = Soleil toujours couché
                sun_always_up = Soleil toujours levé
                more_than_yesterday = de plus qu'hier
                less_than_yesterday = de moins qu'hier
                start_civil_twilight = Aube civile
                rise = Lever
                transit = Transition
                set = Coucher
                end_civil_twilight = Crépuscule civil
                azimuth = Azimut
                altitude = Altitude
                right_ascension = Ascension droite
                declination = Déclinaison
                equinox = Equinoxe
                solstice = Solstice
                total_daylight = Durée du jour
                full_moon = Pleine
                new_moon = Nouvelle
                phase = Phase
                full = Pleine
                install_pyephem = Installer pyephem pour obtenir l'éphéméride.
                
                # Graphs Page Text and Titles
                
                graphs_page_all_button = Tous
                graphs_windrose_frequency = Fréquence
                graphs_windDir_ordinals = '{ 0: "N", 90: "E", 180: "S", 270: "O", 360: "N" }'
                
                # Records Page Text and Titles
                
                records_ending = finissant le
                records_days_text = jours
                records_all_time = Tout le temps
                records_temperature_records = Records de température
                records_high_temp = Température la plus elevée
                records_low_temp = Température la plus basse
                records_high_apptemp = Ressenti le plus haut
                records_low_apptemp = Ressenti le plus bas
                records_high_heatindex = Indice de chaleur maxi
                records_low_windchill = Ressenti le plus bas
                records_largest_temp_range = Amplitude maxi
                records_smallest_temp_range = Amplitude mini
                records_wind_records = Records de vent
                records_strongest_wind = Plus forte rafale de vent
                records_daily_windrun = Plus forte vitesse de vent
                records_rain_records = Records de précipitations
                records_highest_daily_rainfall = Précipitations maxi
                records_highest_daily_rainrate = Plus fort taux de précipitations
                records_month_high_rainfall = Mois avec le plus de précipitations
                records_total_rainfall = Précipitations totales de
                records_consec_days_with_rain = Jours de pluie consécutifs
                records_consec_days_without_rain = Jours consécutifs sans pluie
                records_humidity_records = Records d'humidité
                records_high_humidity = Humidité la plus élevée
                records_lowest_humidity = Humidité la plus basse
                records_highest_dewpoint = Point de rosée le plus élevé
                records_lowest_dewpoint = Point de rosée le plus bas
                records_barometer_records = Records pression atmosphérique
                records_high_barometer = Pression la plus élevée
                records_low_barometer = Pression la plus basse
                records_sun_records = Records d'ensoleillement
                records_high_solar_rad = Ensolleillement le plus élevé
                records_high_uv = Index UV le plus élevé
                
                # NOAA Reports Page Text and Titles
                
                reports_title = Données NOAA
                reports_click_here_link = Cliquez ici
                reports_view_more = pour voir cet historique directement ou cliquez sur un mois ou une année pour charger les données NOAA.
                
                # moment.js default labels formats
                
                time_earthquake = LLL
                time_lastUpdated = LL à LTS
                time_snapshot_records_today_header = dddd LL
                time_snapshot_records_month_header = MMMM YYYY
                time_sunrise = LT
                time_sunset = LT
                time_darksky_alert_expires = LL à LT
                time_darksky_forecast_date = ddd à DD/M
                time_forecast_last_updated = LL à LT
                time_mqtt_websockets_last_updated = LL à LTS
                time_records_page_full_date = LLL
                time_records_page_month_day_year = LL
                time_records_page_rainfall_range_begin = DD MMMM
                time_records_page_rainfall_range_end = LL

Here's Almanac Translatation just down [[[labels]]] section

        [[[Almanac]]]
            
            # The labels to be used for the phases of the moon:
            moon_phases = Nouvelle, Croissante, Premier quartier, Gibbeuse Croissante, Pleine, Gibbeuse décroissante, Dernier Quartier, Décroissante

Optionaly, you can change [[[[ordinates]]]] under [[[units]]] like this

 [[[[Ordinates]]]]
                
                # Ordinal directions. The last one is for no wind direction
                directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSO, SO, OSO, O, ONO, NO, NNO, N/A

You can copy and paste on your weewx.conf sections. Major of your site will be translated. Just think to restart weewx service and wait few minutes, so cheetahgenerator will create the new pages.

@elcanux
Copy link
Author

elcanux commented Jun 14, 2019

Thanks for translation :)

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

4 participants