X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=flower%2Finclude%2Finternational.hh;h=39306daabfde0a7ca2e20fb70fe347d11e60a224;hb=dc71d81b8b6846a01985d3c9eec422607bd076c8;hp=3da5a26a2754a54ffdcda3b909603c9521169179;hpb=1cf3d59c1559fb9774c4c1c8cae155cfe54a927c;p=lilypond.git diff --git a/flower/include/international.hh b/flower/include/international.hh index 3da5a26a27..39306daabf 100644 --- a/flower/include/international.hh +++ b/flower/include/international.hh @@ -1,29 +1,53 @@ -/* - international.hh -- declare stuff for internationalization - - source file of the GNU LilyPond music typesetter - - (c) 1997--1998 Jan Nieuwenhuizen - - */ +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 1997--2011 Jan Nieuwenhuizen + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ #ifndef INTERNATIONAL_HH #define INTERNATIONAL_HH -#include "string.hh" +#include + +#include "std-string.hh" + +/** + Internationalisation: _i ("to be translated") gets an entry in the POT file + gettext () must be invoked explicitly to do the actual "translation". + See flower/getopt-long.cc. +*/ +#define _i(sz) sz // don't inline: get warnings only once /** - Internationalisation: _ ("to be translated") gets "translated" by GNU gettext + Internationalisation: _ ("to be translated") gets "translated" by GNU gettext */ -String _ (char const *ch); +string _ (char const *ch); /** - Internationalisation: _f ("Usage: %s [FILE]", "lilypond") gets "translated" by - GNU gettext + Internationalisation: _f ("Usage: %s [FILE]", "lilypond") gets "translated" by + GNU gettext */ -String _f (char const* format, ...); -String _f (char const* format, String s, String s2 = "", String s3 = ""); +string _f (char const *format, ...) +__attribute__ ((format (printf, 1, 2))); +string _f (char const *format, string s, string s2 = "", string s3 = ""); +/** + va_list version of _f + */ +string v_f (char const *format, va_list args); #endif // INTERNATIONAL_HH