Add a new tag HasGuiSupport to language file. Add it for all l10ns
that we currently ship. The po files that are unused are not currently
tagged as available, but this could be done, since the code later
checks that the translation is actually there.
This new information is used in GuiPrefs when populating the language
combox.
The new scheme implies that adding a new language is now a two-step
process:
* the language code has to be added to po/LINGUAS, as before;
* one of the entries of the lib/language file has to be selected as
reference and be given the "HasGuiSupport true" property.
Since a complete solution requires some refactoring, I fixed the bug for the
most important case: The main document language is only supported by
polyglossia. If any other language than the main one is only supported by
polyglossia the bug is still there.
The previous scheme of loading all possible translations and checking
whether the work is a bit too much "brute force" and causes problems
on Mac OS X (documents loaded with the wrong language).
Now there is an helper static method in Messages class that checks
whether a readable .mo file exist for the language. There should be an
API in gettext for doing that, but alas it is not possible.
As a consequence the method Language::translated() has been removed,
along with its cache.
The previous scheme of loading all possible translations and checking whether the work
is a bit too much "brute force" and causes problems on Mac OS X (documents loaded
with the wrong language).
In the new scheme, autotools install a file lib/installed_translations that contains a list of installed languages (the .gmo files that got installed). This file is read
in Languages::readInstalledTranslations and allows to set the translated() property
of each language.
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:
1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
and InsetListings
exported documents.
To update the translations from the .po files, run
make ../lib/layouttranslations
from po.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38016 a592a061-630c-0410-9148-cb99ea01b6c8
This allows us to remove some ugly hardcoding of languages in the source.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36292 a592a061-630c-0410-9148-cb99ea01b6c8
- new member internalFontEncoding() that indicates if a language
switches the font encoding internally.
* src/Paragraph.cpp (latexSpecialChar):
- don't call latexSpecialT1 if the internal font encoding isn't T1.
This fixes the output of straight quotation marks in Hebrew and Greek.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27660 a592a061-630c-0410-9148-cb99ea01b6c8
- many simplification all over the place.
- improvement to the "Immediate apply" feature.
AFAICS all functionality is restored but please test and report.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24661 a592a061-630c-0410-9148-cb99ea01b6c8
Now support/* should have no dependencies on src/* anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8