i18n: suppress Interlingue

- like Esperanto before Qt 5.12, Interlingue does not
  seem to be supported by QLocale, so it gets turned into
  "C" locale, which then messes up the default language
  selection in the welcome page.

Move it to _incomplete until QLocale does support it.

FIXES #1475
This commit is contained in:
Adriaan de Groot 2020-08-04 12:37:46 +02:00
parent b5c0158ec2
commit 29cfcb01da
2 changed files with 18 additions and 36 deletions

View File

@ -140,20 +140,18 @@ set( CALAMARES_DESCRIPTION_SUMMARY
# TODO: drop the es_ES translation from Transifex
#
# NOTE: move eo (Esperanto) to _ok once Qt can actually create a
# locale for it. (Qt 5.12.2 can, see check later on).
# NOTE: update these lines by running txstats.py, or copy these four lines
# and prefix each variable name with "p", so that the automatic
# checks for new languages and misspelled ones are done (that is,
# copy these four lines to four backup lines, add "p", and then update
# the original four lines with the current translations).
# locale for it. (Qt 5.12.2 can, see Translation Status section).
# NOTE: move ie (Interlingue) to _ok once Qt supports it.
# NOTE: update these lines by running `txstats.py`, or for full automation
# `txstats.py -e`. See also
#
# Total 68 languages
set( _tx_complete ca fi_FI he hr nl pt_BR sq tg tr_TR uk zh_TW )
set( _tx_good as ast az az_AZ be cs_CZ da de es fr hi hu it_IT ja
ko lt ml pt_PT ru sk sv zh_CN )
set( _tx_ok ar bg el en_GB es_MX es_PR et eu fa gl id ie is mr nb
set( _tx_ok ar bg el en_GB es_MX es_PR et eu fa gl id is mr nb
pl ro sl sr sr@latin th )
set( _tx_incomplete bn ca@valencia eo fr_CH gu kk kn lo lv mk ne_NP
set( _tx_incomplete bn ca@valencia eo fr_CH gu ie kk kn lo lv mk ne_NP
ur uz )
### Required versions
@ -286,14 +284,6 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui LinguistTool
if( WITH_QML )
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets )
endif()
if( Qt5_VERSION VERSION_GREATER 5.12.1 )
# At least Qt 5.12.2 seems to support Esperanto in QLocale
if( "eo" IN_LIST _tx_incomplete )
message(STATUS "Esperanto support since Qt 5.12.2, enabling Esperanto locale")
list( REMOVE_ITEM _tx_incomplete "eo" )
list( APPEND _tx_ok "eo" )
endif()
endif()
# Optional Qt parts
find_package( Qt5DBus CONFIG )
@ -429,30 +419,22 @@ set(Calamares_WITH_QML ${WITH_QML})
### Transifex Translation status
#
# Construct language lists for use. If there are p_tx* variables,
# then run an extra cmake-time check for consistency of the old
# (p_tx*) and new (_tx*) lists.
# Construct language lists for use.
#
set( prev_tx ${p_tx_complete} ${p_tx_good} ${p_tx_ok} ${p_tx_incomplete} )
if( Qt5_VERSION VERSION_GREATER 5.12.1 )
# At least Qt 5.12.2 seems to support Esperanto in QLocale
if( "eo" IN_LIST _tx_incomplete )
message(STATUS "Esperanto support since Qt 5.12.2, enabling Esperanto locale")
list( REMOVE_ITEM _tx_incomplete "eo" )
list( APPEND _tx_ok "eo" )
endif()
endif()
set( curr_tx ${_tx_complete} ${_tx_good} ${_tx_ok} ${_tx_incomplete} )
set( tx_errors OFF )
if ( prev_tx )
# Gone in new list
foreach( l ${prev_tx} )
list( FIND curr_tx ${l} p_l )
if( p_l EQUAL -1 )
message(WARNING "Language ${l} was present in previous translations and is now absent.")
set( tx_errors ON )
endif()
endforeach()
if ( curr_tx )
# New in list
foreach( l ${curr_tx} )
list( FIND prev_tx ${l} p_l )
if( p_l EQUAL -1 )
message(WARNING "Language ${l} is new.")
set( tx_errors ON )
endif()
set( p_l "lang/calamares_${l}.ts" )
if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${p_l} )
message(WARNING "Language ${l} has no .ts file yet.")
@ -463,7 +445,6 @@ if ( prev_tx )
unset( p_l )
unset( l )
endif()
unset( prev_tx )
unset( curr_tx )
if( tx_errors )
message( FATAL_ERROR "Translation warnings, see above." )

View File

@ -178,6 +178,7 @@ def get_tx_stats(languages, outputter, verbose):
# and it's at-the-least ok.
incomplete_languages = (
"eo", # Not supported by QLocale < 5.12.1
"ie", # Not supported by Qt at least through 5.15.0
)
all_langs = []