GithubHelp home page GithubHelp logo

Comments (12)

boly38 avatar boly38 commented on June 25, 2024 1

yep (next week) 🙃

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024 1

Hi @kumy .
I need your opinion.

about this usecase: waypoint search gives one result, example:
image

In this case, szukaj-ajax.php append 2 informations

Exemple:

  • $typ == "Multicache"
  • $kraj == "Österreich"

What do you think about using some kind of dynamic translation for theses 2 fields values ?
we could also mount a translation from this two codes :

 _('WPTYP_'.$typ)_
 _('WPKRAJ_'.$kraj)_

In our dictionary we will have some entries starting with prefix "WPTYP_" or "WPKRAJ_" to make frontier between waypoint data related entries and geokrety website legacy entries.

Seems the distinct values for this 2 fields are not so big: 10 cache type (Typ) and 35 country (kraj)
distincttyp
distinctkraj

This result in adding 45 entry to crowdin.

What do you think ?

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024 1

So I think we're no so far (for translations only, I need to work a little bit more on webpage)
https://github.com/geokrety/geokrety-website/blob/perso/boly/website/templates/waypointy-translations.html

is generated by

https://github.com/geokrety/geokrety-scripts/blob/feature/waypointy-translations/waypointy/oc/waypointy-translations.php

from geokrety-website.

kumy avatar kumy commented on June 25, 2024

Hum, nice catch. Those comes directly from the database. The database is synchronized from different opencaching sites. First step would be to synchronize those with English terms instead of "native opencaching site language"? Then we can think of a way to translate. It'll not be that easy. @harrieklomp please don't be frustrated if we don't fix this using the current website. @harrieklomp, @boly38 If you agree, I would close it as "Won't do - in current site version".

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024

We could maybe add a fieldset label 'opencaching results' (adapt wording) to mark the frontier between geokrety and external data.
and then consider this fieldset out of Geokrety responsibility: do not translate the content.

img_20180406_215057

(sorry I close by error)

from geokrety-website.

kumy avatar kumy commented on June 25, 2024

@boly38 would you open a pull request / post a picture of the result?

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024

My personal draft / note:

  • import waypoint oc

todo list before PR:

  • add country translations
  • add cache type translations
  • fix crlf in sql
  • fix template html element
  • add note in contrib md about scrpts and php_cs and translation mechanism
  • [ ] add country code

from geokrety-website.

kumy avatar kumy commented on June 25, 2024

Yep, go for it. Don't forget to add new strings "in English" and probably in a dedicated file as current strings are extracted from source code and not database… A yaml file would be perfect for this,

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024

probably in a dedicated file as current strings are extracted from source code and not database… A yaml file would be perfect for this,

not understand that point, sorry

from geokrety-website.

kumy avatar kumy commented on June 25, 2024

The strings uploaded to crowdin are - until now - extracted from source code using tsmarty2c and xgettext. See

xgettext --from-code=UTF-8 -o $TMP/messages.pot --language=PHP -f website/rzeczy/lang/input-files-for-xgettext
tsmarty2c -o $TMP/smarty.pot ./website/templates/index.html ./website/templates/krety-m.html ./website/templates/krety.html ./website/templates/krety_not_logged_in.html ./website/templates/krety_logged_in.html
msgcat -o website/rzeczy/messages.po.txt $TMP/messages.pot $TMP/smarty.pot

If I'm not mistaken, you want to translate some strings that come from the database (table gk-waypointy). The point I raised was to solve this. "How to inform crowdin about those strings coming from the database?".

So, I suggest to extract/copy those 45 strings out of the database as a static file, as yaml for example. And use a tool to convert .yml file to .po file, like yaml2po. Then merge all our 3 files into one and finally upload it to crowdin. All this should happen in the script cited above L27-29.

Of course, the strings in the database need to be translated into English first, and also be in English in the .yml file.

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024

ok thanks for your lights. I will see that and follow this way 🤸

from geokrety-website.

boly38 avatar boly38 commented on June 25, 2024

hey, finally we have got

110 countries (result in 79 unique english translations)

See

('Albania', 'Albania'),
('Albanien', 'Albania'),
('Argentyna', 'Argentina'),
('Armenia', 'Armenia'),
('Australien', 'Australia'),
('Austria', 'Australia'),
('Belgia', 'Belgium'),
('Belgien', 'Belgium'),
('Białoruś', 'Belarus'),
('Bosnien-Herzegowina', 'Bosnia and Herzegovina'),
('Brasilien', 'Brazil'),
('Bulgarien', 'Bulgaria'),
('Bułgaria', 'Bulgaria'),
('Chiny', 'China'),
('Chorwacja', 'Croatia'),
('Costa Rica', 'Costa Rica'),
('Cypr', 'Cyprus'),
('Czeska Republika', 'Czech Republic'),
('Dänemark', 'Denmark'),
('Dania', 'Denmark'),
('Demokratische Volksrepublik Korea', 'North Korea'),
('Deutschland', 'Germany'),
('Ecuador', 'Ecuador'),
('Egipt', 'Egypt'),
('Estonia', 'Estonia'),
('Falklandinseln', 'Falkland Islands'),
('Färöer (zu Dänemark)', 'Faroe Islands'),
('Finlandia', 'Finland'),
('Finnland', 'Finland'),
('Francja', 'France'),
('Frankreich', 'France'),
('Georgien', 'Georgia'),
('Gibraltar', 'Gibraltar'),
('Grecja', 'Greece'),
('Griechenland', 'Greece'),
('Grönland', 'Greenland'),
('Großbritannien', 'United Kingdom'),
('Hiszpania', 'Spain'),
('Holandia', 'Netherlands'),
('Indie', 'India'),
('Irland', 'Ireland'),
('Irlandia', 'Ireland'),
('Island', 'Iceland'),
('Islandia', 'Iceland'),
('Israel', 'Israel'),
('Italien', 'Italy'),
('Kambodża', 'Cambodia'),
('Kasachstan', 'Kazakhstan'),
('Kenia', 'Kenya'),
('Kirgistan', 'Kyrgyzstan'),
('Kroatien', 'Croatia'),
('Litwa', 'Lithuania'),
('Luxemburg', 'Luxembourg'),
('Łotwa', 'Latvia'),
('Malta', 'Malta'),
('Marokko', 'Morocco'),
('Maroko', 'Morocco'),
('Mauritius', 'Mauritius'),
('Mazedonien', 'Macedonia'),
('Mołdawia', 'Moldova'),
('Monako', 'Monaco'),
('Nepal', 'Nepal'),
('Neuseeland', 'New Zealand'),
('Niderlandy', 'Netherlands'),
('Niederlande', 'Netherlands'),
('Niederländische Antillen', 'Netherlands Antilles'),
('Niemcy', 'Germany'),
('Norwegen', 'Norway'),
('Norwegia', 'Norway'),
('Österreich', 'Austria'),
('Polen', 'Poland'),
('Polska', 'Poland'),
('Portugal', 'Portugal'),
('Portugalia', 'Portugal'),
('Rosja', 'Russia'),
('Rumänien', 'Romania'),
('Rumunia', 'Romania'),
('Russische Föderation', 'Russia'),
('Schweden', 'Sweden'),
('Schweiz', 'Switzerland'),
('Serbien', 'Serbia'),
('Serbien und Montenegro', 'Serbia and Montenegro'),
('Seychellen', 'Seychelles'),
('Simbabwe', 'Zimbabwe'),
('Slowenien', 'Slovenia'),
('Słowacja', 'Slovakia'),
('Spanien', 'Spain'),
('Südgeorgien und die Südlichen Sandwichinseln', 'South Georgia and the South Sandwich Islands'),
('Svalbard und Jan Mayen', 'Svalbard and Jan Mayen'),
('Szwajcaria', 'Switzerland'),
('Szwecja', 'Sweden'),
('Tajlandia', 'Thailand'),
('Thailand', 'Thailand'),
('Tschechische Republik', 'Czech Republic'),
('Tunezja', 'Tunisia'),
('Turcja', 'Turkey'),
('Türkei', 'Turkey'),
('Uganda', 'Uganda'),
('Ukraina', 'Ukraine'),
('Ungarn', 'Hungary'),
('USA', 'USA'),
('Usbekistan', 'Uzbekistan'),
('Vereinigte Staaten', 'United States'),
('Vietnam', 'Vietnam'),
('Volksrepublik China', 'China'),
('Węgry', 'Hungary'),
('Wielka Brytania', 'United Kingdom'),
('Wietnam', 'Vietnam'),
('Włochy', 'Italy'),
('Zjednoczone Emiraty Arabskie', 'United Arab Emirates')

19 cache types (result in 14 unique english translations)

See

('beweglicher Cache', 'Mobile'),
('Drive-In-Cache', 'Drive-In'),
('Event-Cache', 'Event'),
('Mathe-/Physikcache', 'Math / physics cache'),
('Mobilna', 'Mobile'),
('Multicache', 'Multicache'),
('normaler Cache', 'Traditional'),
('Own cache', 'Own cache'),
('Podcast cache', 'Podcast cache'),
('Quiz', 'Quiz'),
('Rätselcache', 'Mystery'),
('Skrzynka nietypowa', 'Unusual box'),
('Tradycyjna', 'Traditional'),
('unbekannter Cachetyp', 'Unknown cache'),
('virtueller Cache', 'Virtual'),
('Webcam', 'Webcam'),
('Webcam-Cache', 'Webcam'),
('Wirtualna', 'Virtual'),
('Wydarzenie', 'Event')

You could put an eye to see any error.

Next step: crowdin input

@kumy following you advice, and out of error, seems we are not already using yaml2po , BTW we already have some translations detected by tsmarty2c from simple html template. I think first I will generate simple html with template for each.

from geokrety-website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.