Skip to content

Commit

Permalink
Omit Korean from New Test Suite dialog, because RF 7.0.1 does not sup…
Browse files Browse the repository at this point in the history
…port yet
  • Loading branch information
HelioGuilherme66 committed Aug 15, 2024
1 parent 4889b8d commit ec9e47d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def set_content(self, html_win, content):
<pre class="literal-block">
python -m robotide.postinstall -install
</pre>
<p>RIDE {VERSION} was released on 11/August/2024.</p>
<p>RIDE {VERSION} was released on 15/August/2024.</p>
<!-- <br/>
<h3>May The Fourth Be With You!</h3>
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>
Expand Down
14 changes: 11 additions & 3 deletions src/robotide/ui/filedialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from robot.conf.languages import Language
except ImportError:
try:
from robotide.lib.compat.parsing.languages import Language
from ..lib.compat.parsing.languages import Language
except ImportError:
Language = None

Expand Down Expand Up @@ -129,6 +129,10 @@ def _create_lang_chooser(self, sizer):
languages = read_languages()
if languages[0] != '':
languages.insert(0, '')
# Remove non-existing language, Korean
for value in languages:
if value == 'Korean':
languages.remove(value)
if isinstance(lang, list) and len(lang) > 0:
_settings[DOC_LANGUAGE] = lang[0]
lang = lang[0]
Expand Down Expand Up @@ -242,8 +246,12 @@ def selected_language(self):
lang = lang[0]
if lang in ('en',): # We will only consider English as the effective setting
return ['en']
mlang = Language.from_name(lang.replace('_', '-'))
set_lang[0] = mlang.code.replace('-', '_')
try:
mlang = Language.from_name(lang.replace('_', '-'))
set_lang[0] = mlang.code.replace('-', '_')
except ValueError: # For the case of missing language, like Ko
set_lang[0] = 'en'
return ['en']
else:
return [set_lang[0]]
return [mlang.name]
Expand Down

0 comments on commit ec9e47d

Please sign in to comment.