GithubHelp home page GithubHelp logo

Translation support about openrhythm HOT 6 CLOSED

openrhythm avatar openrhythm commented on May 28, 2024
Translation support

from openrhythm.

Comments (6)

mdsitton avatar mdsitton commented on May 28, 2024

Well FoFiX used gettext on windows and osx so i guess it will work? I'll look into this in a bit.

Translations are one of the things i really do want to get correct early on, along with proper unicode text rendering for UIs.

Text should definitely be stored as UTF-8 though that much i've decided :P

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Utf-8 is life, yeah ^^ and seeing the awful text rendering issues (cant set fofix in french)... Yeah. Cant even unverstand how FoFiX has this kind of bugs...

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Pushed Gettext support in 19f44ad.

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Just so you know (if you don't already), all strings should be used like

# File header :
#include <libintl.h>
#define _(STRING) gettext(STRING)

_("the string to be translated")
# Smth like
m_logger->info(_("Loading MIDI"));

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

The initialization code is :

    /* Setting the i18n environment */
    setlocale (LC_ALL, "");
    bindtextdomain ("openrhythm", LOCALE_DIR);
    textdomain ("openrhythm");

For now (not commited nor pushed) I just pasted this in the main(), but I'll have to find a better place for this. Maybe directly in a preferences/ directory, containing the preferences changes+reading+saving utility code.

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Ah yeah, and the bad news is that the POTFILES.in file has to contain the files list. Could not do that in CMake, and that's a shame.

from openrhythm.

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.