Git Product home page Git Product logo

Comments (7)

Luc3as avatar Luc3as commented on June 11, 2024

Hello,
I just pushed updated code to "fool" international characters,
#43

from esp8266-weather-station-color.

LaurisGale avatar LaurisGale commented on June 11, 2024

That is great! I reused your translit code - works like a charm, but real characters would be even better :)

from esp8266-weather-station-color.

Luc3as avatar Luc3as commented on June 11, 2024

I definitelly agree, but making extended font is something way beyond my skill now and as the author is currently not having time I guess the only way was like that. By the way If you have some additional translation files with strings translated you can post it somewhere and I can add it to the pull request.

from esp8266-weather-station-color.

LaurisGale avatar LaurisGale commented on June 11, 2024

Attached is the language_LT.h (Lithuanian translation).

Letter replacement string:

String Translit(String str) { String lat_up[] = {"Ą" , "Č" , "Ę" , "Ė" , "Į" , "Š" , "Ų" , "Ū" , "Ž"}; String lat_low[] = {"ą" , "č" , "ę" , "ė" , "į" , "š" , "ų" , "ū" , "ž"}; String trans_up[] = {"A" , "C" , "E" , "E" , "I" , "S" , "U" , "U" , "Z"}; String trans_low[] = {"a" , "c" , "e" , "e" , "i" , "s" , "u" , "u" , "z"}; for (int i = 0; i < 9 ; i++) { str.replace(lat_up[i],trans_up[i]); str.replace(lat_low[i],trans_low[i]); } return str; }

language_LT.h.txt

from esp8266-weather-station-color.

LaurisGale avatar LaurisGale commented on June 11, 2024

There is also one thing that does not want to translit. The helper for forecast columns where weekdays are truncated to 3 chars and I cannot correctly transliterate it. Tried differently but here's the latest code:

// helper for the forecast columns
void drawForecastDetail(uint16_t x, uint16_t y, uint8_t dayIndex) {
gfx.setColor(MINI_YELLOW);
gfx.setFont(Roboto_Medium_14);
gfx.setTextAlignment(TEXT_ALIGN_CENTER);
String day = Translit(forecasts[dayIndex].forecastTitle.substring(0, 3));
day.toUpperCase();
gfx.drawString(x + 25, y - 15, Translit(day));

Any thoughts?

from esp8266-weather-station-color.

Luc3as avatar Luc3as commented on June 11, 2024

from esp8266-weather-station-color.

stale avatar stale commented on June 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from esp8266-weather-station-color.

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.