Adding @defgroup and @ingroup doxygen tags into all headers
in the common folder that contain doxygen blocks.
This improves the structure, readability, and findability
of information in the resulting output.
This commit targets purely structure and does not deal with
the content of the currently existing doxygen documentation.
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
Because po files now (should) use UTF-8, a bunch of code in ScummVM is redundant. This commit addresses that.
- Remove charsetMapping and related variables.
- Remove the code that used these functions.
- Remove cp_parser.cpp. This is removed because the use of codepages is no longer needed.
- Remove iso-8859-x codepages (see above message)
- Always set mapping as 0 in ThemeEngine::loadScalableFont
- Check if ascii or not by getting charset in about dialog.
- The previous commit removes all codepage additions to the create_translations tool.
- Following that, this commit removes all the reading from .dat file related to codepages
This commit also includes some additional major changes.
- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
Continuing the work at https://github.com/scummvm/scummvm/pull/2236,
which moved `convertBiDiString(..page)` to unicode-bidi.h,
now moving to there also the `(..lang)` flavour.
Thus, translation.h has only the SVM-GUI related function, and the
two util functions page+code are in unicode-bidi.
Added GNU FriBidi, thus allowing Hebrew (or other future RTL languages)
to be displayed correctly.
It's been implemented for all ScummVM GUI (as far as I have noticed),
and can be further used by the engines as needed.
This work is only partial, because for complete BiDI support we'll need
to mirror the widgets, and support input text areas (which currently
don't even support Hebrew text input at all).
Some changes are required in order to use this:
- Visual Studio:
-- add FriBidi lib from https://github.com/ShiftMediaProject/fribidi
(and place the files in the other libs location)
-- add fribidi.dll to the current directory
-- add fribidi.lib to VS library list
(in GUI it's: Project -> scummvm Properties -> Linker ->
input -> Additional Dependencies)
-- Add USE_FRIBIDI define
either to:
dists/msvc/ScummVM_Global.props <PreprocessorDefinitions>
or in GUI:
Project -> scummvm Properties ->
C/C++ -> Preprocessor -> Preprocessor Definitions
- GCC:
-- install FriBidi
e.g.,
Ubuntu: `apt-get install libfribidi-dev`
CentOS: `yum install fribidi-devel`
-- rerun `configure`
The charsets used by the translations now need to have a "$(name).cp" file,
which contains an charset index => unicode mapping. Otherwise
create_translations will fail.
- Broaden the range of language tags that could be accepted as fallback in
auto-detection. For example, for a system with locale 'pt_PT', all of
these would be accepted as valid fallbacks: 'pt_PT_*', 'pt', 'pt_*'
- Make language codes matching case-insensitive as specified in RFC 4647.
- Add support language code blocks longer than 2 characters.
svn-id: r54715
When switching to a theme that do not have the fonts needed to properly
display the current language, it now revert to the previously used theme
and display an error message telling the user to change the language
first if he wants to use the theme he selected.
svn-id: r52969
Currently static strings are marked with the _s() macro so that xgettext knows
the string needs to be translated. But there was no way to tell xgettext that
the string could get translated in different contexts. This is the role of this new
macro.
svn-id: r52460
If the translations.dat file is not found using the SearchMan, it now looks
for that file into the themepath directory and sub-directories (if the path is
defined).
svn-id: r52428
This change means there can now be different translations for the same
english string depending on the context. It is based on gettext msgctxt feature.
There is a new macro _c(msg, ctxt) that should be used instead of _(msg) in
the source code when we want to add a context to the message. For the
moment I have added contexts to only one message ("None") so that I could
test the changes. Context could be added also to get shorter translations when
GUI is in 1x mode.
I have also added back the fuzzy option to msmerge since it is useful when
adding contexts to populate the translations for the new contexts.
svn-id: r52308
The GUI now uses the content of the Language field from the po file
header if it is present and not empty for the language selection
PopupWidget. If not present it uses the file name as before (e.g.
ru_RU).
Also update all the translation template and all the translation files.
svn-id: r51542
Currently it ws not decided where to put fonts, but if you put BDF files into
themepath, they will get picked up.
The font name has to contain same codepage specification as in the .po file,
i.e. fixed5x8-iso-8859-5.bdf for Cyrillic codepage. In case the font does not
exist, default will be used.
All built in fonts get proper names.
TODO: Currently there is a bug with our font cacher. Font clR6x12-iso-8859-5
is empty after loading from FCC file. Reason is unknown.
svn-id: r50448
In recent discussions on -devel it turned out, that this
feature is rather superfluous and instead we should rather
implement a proper error reporting in our GUI.
I also removed the dependency on iconv along with this.
svn-id: r50335
Based on patch #2903830: "Updated Translation Prototype" by alexbevi
which in turn is based on patch #1739965 by jvprat.
Currently it builds all translations right into ScummVM. Once the
feature will be accepted more widely, i.e. more translations will
pop up, it will be trivial to move translation strings to external
file.
Finished translation: Russian
Unfinished translation: Hungarian
Things which are nice to do:
- Language code -> language mapping for more user friendness
- Specifying fonts to be used with language
- Updating of interface language without restart. It will require
moving of much code to reflowLayout() methods for each dialog
The .po files must be in single byte encodings. I.e. no support
for Unicode.
svn-id: r49759