diff --git a/MANIFEST.in b/MANIFEST.in
index a8c98a5a74a..e2a1273016f 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -16,6 +16,8 @@ recursive-include distribute *.svg *.desktop
include requirements*.txt
+recursive-include i18n *.jaml *.yaml
+
include README.md
include README.pypi
include CONTRIBUTING.md
diff --git a/Orange/widgets/data/owpreprocess.py b/Orange/widgets/data/owpreprocess.py
index 7a6e7342699..d771b11436f 100644
--- a/Orange/widgets/data/owpreprocess.py
+++ b/Orange/widgets/data/owpreprocess.py
@@ -738,9 +738,12 @@ def createinstance(params):
def __repr__(self):
if self.__strategy == self.Fixed:
- return f"select {self.__k} {pl(self.__k,'feature')}"
+ # private attributes may not appear translated strings
+ num = self.__k
+ return f"select {num} {pl(num,'feature')}"
else:
- return f"select {self.__p} % features"
+ perc = self.__p
+ return f"select {perc} % features"
def index_to_enum(enum, i):
diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml
index 10725105a87..b3c6138cc03 100644
--- a/conda-recipe/meta.yaml
+++ b/conda-recipe/meta.yaml
@@ -37,7 +37,7 @@ requirements:
run:
- python
# GUI requirements
- - orange-canvas-core >=0.2.0,<0.3a
+ - orange-canvas-core >=0.2.2,<0.3a
- orange-widget-base >=4.23.0
- anyqt >=0.2.0
- pyqt >=5.12,!=5.15.1,<6.0
diff --git a/i18n/si/msgs.jaml b/i18n/si/msgs.jaml
index 7c059d4ed46..86e160cb63c 100644
--- a/i18n/si/msgs.jaml
+++ b/i18n/si/msgs.jaml
@@ -2194,7 +2194,7 @@ evaluation/testing.py:
def `fit`:
Validation.fit is deprecated; use the call operator: false
def `_collect_part_results`:
- Multiple targets are not supported.: Večrazredni problemi niso podprti.
+ Multiple targets are not supported.: Ocenjevanje modelov z več razredi ni podprto.
class `CrossValidation`:
def `get_indices`:
Using non-stratified sampling.: false
@@ -2600,8 +2600,8 @@ preprocess/discretize.py:
month: mesec
%Y: false
year: leto
- {step // 7} week{'s' * (step > 7)}: {step // 7} {plsi(step // 7, "teden|tedna|tedni|tednov")}
- {step} {unit}{'s' * (step > 1)}: {step} {plsi(step, dict(dan="dan|dneva|dnevi|dni", teden="teden|tedna|tedni|tednov", mesec="mesec|meseca|meseci|mesecev", leto="leto|leti|leta|let").get(unit, unit))}
+ {step // 7} week{'s' * (step > 7)}: {step // 7} {plsi(step // 7, 'teden|tedna|tedni|tednov')}
+ {step} {unit}{'s' * (step > 1)}: {step} {plsi(step, dict(dan='dan|dneva|dnevi|dni', teden='teden|tedna|tedni|tednov', mesec='mesec|meseca|meseci|mesecev', leto='leto|leti|leta|let').get(unit, unit))}
def `_simplified_labels`:
42: false
' ': false
@@ -3167,17 +3167,17 @@ regression/pls.py:
def `project`:
PLSModel can only project tables: false
def `components`:
- components: false
- Component {i + 1}: false
+ components: komponente
+ Component {i + 1}: Komponenta {i + 1}
def `coefficients_table`:
- coef {i}: false
- name: false
- coefficients: false
+ coef {i}: koef {i}
+ name: ime
+ coefficients: koeficienti
def `residuals_normal_probability`:
- {name} ({var.name}): false
- Sample Quantiles: Vzorčni kvantili:
- Theoretical Quantiles: Teoretični kvantili:
- residuals normal probability: verjetnosti residualov
+ {name} ({var.name}): true
+ Sample Quantiles: Vzorčni kvantili
+ Theoretical Quantiles: Teoretični kvantili
+ residuals normal probability: verjetnost normalnih residualov
def `dmodx`:
DModX: false
DMod: false
@@ -3185,11 +3185,11 @@ regression/pls.py:
def `fit`:
n_components: false
def `incompatibility_reason`:
- Numeric targets expected.: false
- Only numeric target variables expected.: false
+ Numeric targets expected.: Metoda zahteva številčne ciljne spremenljivke.
+ Only numeric target variables expected.: Metoda deluje le za številčne ciljne spremenljivke.
__main__: false
housing: false
- 'learner: {learner}\nRMSE: {ca}\n': true
+ 'learner: {learner}\nRMSE: {ca}\n': false
regression/random_forest.py:
RandomForestRegressionLearner: false
class `RandomForestRegressor`:
@@ -4264,7 +4264,7 @@ widgets/data/owaggregatecolumns.py:
class `Outputs`:
Data: Podatki
class `Warning`:
- Some input features are categorical:\n{}: Nekatere vhodne spremenljivke so kategorične:\{}
+ Some input features are categorical:\n{}: Nekatere vhodne spremenljivke so kategorične:\n{}
Some input features are missing:\n{}: Nekatere vhodne spremenljivke manjkajo:\n{}
Sum: Vsota
Product: Produkt
@@ -5646,7 +5646,7 @@ widgets/data/oweditdomain.py:
Apply: Potrdi
button-apply: false
Apply changes and commit data on output.: Potrdi spremembe in pošlji podatke na izhod.
- def `_restore`:
+ def `_update_restore_warnings`:
', ': false
def `_set_modified`:
button-apply: false
@@ -7009,8 +7009,8 @@ widgets/data/owpreprocess.py:
k: false
p: false
def `__repr__`:
- select {self.__k} {pl(self.__k,'feature')}: izbor {self.__k} {plsi(self.__k,'primer')}
- select {self.__p} % features: izbor {self.__p} % primerov
+ select {num} {pl(num,'feature')}: izbor {num} {plsi(num,'primer')}
+ select {perc} % features: izbor {perc} % primerov
class `Scale`:
Standardize to μ=0, σ²=1: Standardiziraj (μ=0, σ²=1)
Center to μ=0: Centriraj (μ=0)
@@ -8208,15 +8208,15 @@ widgets/data/utils/tablesummary.py:
sparse: redki
tags: oznake
' ({tag}, density {dens:.2f} %)': ' ({tag}, gostota {dens:.2f} %)'
- {ninst} {pl(ninst, 'instance')}: {ninst} {plsi(ninst, "primer")}
- ~{ninst} {pl(ninst, 'instance')}: ~{ninst} {plsi(ninst, "primer")}
+ {ninst} {pl(ninst, 'instance')}: {ninst} {plsi(ninst, 'primer')}
+ ~{ninst} {pl(ninst, 'instance')}: ~{ninst} {plsi(ninst, 'primer')}
' (no missing data)': ' (ni manjkajočih podatkov)'
{nattrs} {pl(nattrs, 'feature')}: {nattrs} {plsi(nattrs, 'spremenljivka')}
No target variable.: Ni ciljne spremenljivke.
{nclasses} {pl(nclasses, 'outcome')}: {nclasses} {plsi(nclasses, 'ciljna spremenljivka|ciljni spremenljivki|ciljne spremenljivke|ciljnih spremenljivk')}
Numeric outcome: Številska ciljna spremenljivka
- Target with {nvalues} {pl(nvalues, 'value')}: Ciljna spremenljivka {plsi_sz(nvalues)} {z_besedo(nvalues, 6, "m")} {plsi(nvalues, "razredom|razredoma|razredi")}
- {nmetas} {pl(nmetas, 'meta attribute')}: {nmetas} meta {plsi(nmetas, "spremenljivka")}
+ Target with {nvalues} {pl(nvalues, 'value')}: Ciljna spremenljivka {plsi_sz(nvalues)} {z_besedo(nvalues, 6, 'm')} {plsi(nvalues, 'razredom|razredoma|razredi')}
+ {nmetas} {pl(nmetas, 'meta attribute')}: {nmetas} meta {plsi(nmetas, 'spremenljivka')}
No meta attributes.: Ni meta spremenljivk.
widgets/data/utils/tableview.py:
class `DataTableView`:
@@ -8932,29 +8932,29 @@ widgets/evaluate/owpermutationplot.py:
item: false
class `PermutationPlot`:
def `__init__`:
- Correlation between original Y and permuted Y (%): Korelacija med izvirno Y in permutiranim Y (%)
+ Correlation between original Y and permuted Y (%): Korelacija med izvirnim Y in permutiranim Y (%)
bottom: false
def `set_data`:
left: false
AUC: true
- '#000': false
- '#333': false
+ '#000': true
+ '#333': true
pen: false
symbol: false
o: false
brush: false
- '#6fa255': false
+ '#6fa255': true
s: false
- '#3a78b6': false
+ '#3a78b6': true
size: false
hoverable: false
tip: false
- 'x: {x:.3g}\ny: {y:.3g}': false
- Train: Testni
- CV: Prečno preverjanje
+ 'x: {x:.3g}\ny: {y:.3g}': true
+ Train: Učna
+ CV: Prečno
class `OWPermutationPlot`:
- Permutation Plot: Permutacijska krivulja
- Permutation analysis plotting: Prikaz permutacijske analize
+ Permutation Plot: Permutacijski grafikon
+ Permutation analysis plotting: Grafični prikaz permutacijske analize
icons/PermutationPlot.svg: false
graph.plotItem: false
class `Inputs`:
@@ -8988,7 +8988,25 @@ widgets/evaluate/owpermutationplot.py:
{y_cv:.4f} |
- ': false
+ ': '
+
+
+ |
+ Kor. = 0 |
+ Kor. = 100 |
+
+
+ Učni |
+ {intercept_tr:.4f} |
+ {y_tr:.4f} |
+
+
+ Prečno |
+ {intercept_cv:.4f} |
+ {y_cv:.4f} |
+
+
+ '
def `send_report`:
Settings: Nastavitve
Permutations: Permutacije
@@ -9037,7 +9055,7 @@ widgets/evaluate/owpredictions.py:
Classes in data and model: razrede iz tabele in modelov
Don't show probabilities: Ne kaži verjetnosti
Show probabilities for classes in the data: Pokaži verjetnosti razredov v tabeli
- Show probabilities for classes known to the model,\n: Pokaži verjetnosti razredov, ki jih napovedujejo modeli,\m
+ Show probabilities for classes known to the model,\n: Pokaži verjetnosti razredov, ki jih napovedujejo modeli,\n
including those that don't appear in this data: vključno s temi, ki jih v podatkih ni.
Show probabilities for classes in data that are also\n: Pokaži verjetnosti razredov, ki se pojavijo v podatkih\n
known to the model: in so znani tudi modelom.
@@ -9072,7 +9090,7 @@ widgets/evaluate/owpredictions.py:
def `_get_details`:
Data:
: Podatki:
: false
- "Model: {n_predictors} {pl(n_predictors, 'model')}": Modeli: {n_predictors} {plsi(n_predictors, "model")}
+ "Model: {n_predictors} {pl(n_predictors, 'model')}": Modeli: {n_predictors} {plsi(n_predictors, 'model')}
' ({n_predictors - n_valid} failed)': ' ({n_predictors - n_valid} z napako)'
: false
- {name}
: false
@@ -9301,7 +9319,7 @@ widgets/evaluate/owtestandscore.py:
Missing separate test data input.: Na vhodu ni testnih primerov.
Some scores could not be computed.: Nekaterih mer ni bilo mogoče izračunati.
'Test data is present but unused. ': 'Testni primeri so podani, a neuporabljeni. '
- Select 'Test on test data' to use it.: Izberite "Testiraj na testnih primerih".
+ Select 'Test on test data' to use it.: Izberite 'Testiraj na testnih primerih'.
"Can't run stratified {}-fold cross validation; ": 'Ne morem uporabiti {}-kratnega stratificiranega prečnega preverjanja; '
the least common class has only {} instances.: najmanjši razred ima samo {} primerov.
class `Information`:
@@ -9354,7 +9372,7 @@ widgets/evaluate/owtestandscore.py:
def `update_stats_model`:
{:.3f}: false
{} (error): {} (napaka)
- {name} failed with error:\n: {name} je javil napako\:n
+ {name} failed with error:\n: {name} je javil napako:\n
'{exc.__class__.__name__}: {exc!s}': false
\n: false
def `_scores_by_folds`:
@@ -9487,7 +9505,7 @@ widgets/model/owadaboost.py:
class `OWAdaBoost`:
AdaBoost: true
'An ensemble meta-algorithm that combines weak learners ': 'Skupinski algoritem učenja, ki združuje šibke algoritme '
- "and adapts to the 'hardness' of each training sample. ": in prilagaja "težavnosti" učnih primerov.
+ "and adapts to the 'hardness' of each training sample. ": in prilagaja 'težavnosti' učnih primerov.
icons/AdaBoost.svg: false
Orange.widgets.classify.owadaboost.OWAdaBoostClassification: false
Orange.widgets.regression.owadaboostregression.OWAdaBoostRegression: false
@@ -9648,7 +9666,7 @@ widgets/model/owcurvefit.py:
Missing a fitting parameter.\n: Manjkajoč parameter.
Use 'Feature Constructor' widget instead.: Uporabite gradnik Sestavi značilke.
Unknown parameter '{}'.\n: Neznan parameter '{}'.\n
- Declare the parameter in 'Parameters' box: Deklarirajte ga v škatli "Parametri"
+ Declare the parameter in 'Parameters' box: Deklarirajte ga v škatli 'Parametri'
'Some parameters and features have the same ': 'Nekateri parametri in spremenljivke imajo '
name '{}'.: enaka imena '{}'.
Select Feature: Izberite spremenljivko
@@ -9906,7 +9924,6 @@ widgets/model/owlogisticregression.py:
None: Brez
l1: false
l2: false
- none: false
class `Warning`:
Weighting by class may decrease performance.: Uteževanje glede na razred lahko upočasni učenje.
def `add_main_layout`:
@@ -9921,13 +9938,11 @@ widgets/model/owlogisticregression.py:
Balance class distribution: Uravnoteži razrede
Weigh classes inversely proportional to their frequencies.: Uteži razrede obratno sorazmerno njihovi pogostosti
def `set_c`:
- none: false
C={}: true
C={:.3f}: true
N/A: NN
def `create_learner`:
balanced: false
- none: false
def `get_learner_parameters`:
Regularization: Regularizacija
'{}, C={}, class weights: {}': {}, C={}, uteži razredov: {}
@@ -10020,10 +10035,10 @@ widgets/model/owpls.py:
partial least squares: partial least squares, pls, regresija
class `Outputs`:
Coefficients and Loadings: Koeficienti in uteži
- Data with Scores: Podatki z rezultati
+ Data with Scores: Podatki z vrednostmi
Components: Komponente
class `Warning`:
- 'Sparse input data: default preprocessing is to scale it.': 'Redki vhodni podatki: privzeta predobdelava je skaliranje.'
+ 'Sparse input data: default preprocessing is to scale it.': Redki vhodni podatki: privzeta predobdelava je skaliranje.
def `add_main_layout`:
Optimization Parameters: Optimizacijski parametri
n_components: false
@@ -10034,8 +10049,8 @@ widgets/model/owpls.py:
Scale features and target: Skaliraj spremenljivke in ciljno spremenljivko
def `_create_output_coeffs_loadings`:
coef ({v.name}): koef ({v.name})
- coef/X_sd ({v.name}): koef/X_sd ({v.name})
- w*c {i + 1}: true
+ coef * X_sd ({v.name}): false
+ w*c {i + 1}: false
Variable name: Ime spremenljivke
Variable role: Vloga spremenljivke
Feature: Značilka
@@ -11261,7 +11276,7 @@ widgets/unsupervised/owlouvainclustering.py:
graph: false
partition: false
def `__set_results`:
- {num_clusters} {pl(num_clusters, 'cluster')} found.: {plsi(num_clusters, "Najdena|Najdeni|Najdene|Najdenih")} {z_besedo(num_clusters, 1, "f")} {plsi(num_clusters, "gruča")}.
+ {num_clusters} {pl(num_clusters, 'cluster')} found.: {plsi(num_clusters, 'Najdena|Najdeni|Najdene|Najdenih')} {z_besedo(num_clusters, 1, 'f')} {plsi(num_clusters, 'gruča')}.
def `_send_data`:
Cluster: Gruča
C%d: G%d
@@ -11270,7 +11285,7 @@ widgets/unsupervised/owlouvainclustering.py:
def `clear`:
No data on input.: Ni podatkov na vhodu.
def `send_report`:
- , {self.pca_components} {pl(self.pca_components, 'component')}: , {self.pca_components} {plsi(self.pca_components, "komponenta")}
+ , {self.pca_components} {pl(self.pca_components, 'component')}: , {self.pca_components} {plsi(self.pca_components, 'komponenta')}
Normalize data: Normiranje podatkov
PCA preprocessing: Predprocesiranje s PCA
Metric: Mera razdalje
@@ -12413,6 +12428,9 @@ widgets/utils/itemmodels.py:
TableModel: false
ModelActionsWidget: false
ListSingleSelectionModel: false
+ select_row: false
+ select_rows: false
+ signal_blocking: false
def `_as_contiguous_range`:
Non-contiguous range.: false
class `AbstractSortTableModel`:
@@ -14421,7 +14439,7 @@ widgets/visualize/owscatterplot.py:
def `update_reg_line_label_colors`:
label: false
def `_update_curve`:
- '#505050': false
+ '#505050': true
class `OWScatterPlot`:
Scatter Plot: Razsevni diagram
'Interactive scatter plot visualization with ': Interaktivni prikaz podatkov z razsevnim diagramom.
@@ -14445,7 +14463,7 @@ widgets/visualize/owscatterplot.py:
otherwise fit y as a function of x (minimize vertical distances): sicer pa minimizira samo razdaljo v smeri y.
graph.show_ellipse: false
Show confidence ellipse: Prikaz elipse zaupanja
- Hotelling's T² confidence ellipse (α=95%): Hotellingova elipsa zaupanja T² (α=95%)
+ Hotelling's T² confidence ellipse (α=95%): Elipsa zaupanja po Hotellingu (α=95%)
def `_add_controls_axis`:
Axes: Osi
attr_x: false
diff --git a/i18n/si/static/canvas/workflows/110-file-and-data-table-widget.ows b/i18n/si/static/canvas/workflows/si/110-file-and-data-table-widget.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/110-file-and-data-table-widget.ows
rename to i18n/si/static/canvas/workflows/si/110-file-and-data-table-widget.ows
diff --git a/i18n/si/static/canvas/workflows/120-scatterplot-data-table.ows b/i18n/si/static/canvas/workflows/si/120-scatterplot-data-table.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/120-scatterplot-data-table.ows
rename to i18n/si/static/canvas/workflows/si/120-scatterplot-data-table.ows
diff --git a/i18n/si/static/canvas/workflows/130-scatterplot-visualize-subset.ows b/i18n/si/static/canvas/workflows/si/130-scatterplot-visualize-subset.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/130-scatterplot-visualize-subset.ows
rename to i18n/si/static/canvas/workflows/si/130-scatterplot-visualize-subset.ows
diff --git a/i18n/si/static/canvas/workflows/250-tree-scatterplot.ows b/i18n/si/static/canvas/workflows/si/250-tree-scatterplot.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/250-tree-scatterplot.ows
rename to i18n/si/static/canvas/workflows/si/250-tree-scatterplot.ows
diff --git a/i18n/si/static/canvas/workflows/305-pca.ows b/i18n/si/static/canvas/workflows/si/305-pca.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/305-pca.ows
rename to i18n/si/static/canvas/workflows/si/305-pca.ows
diff --git a/i18n/si/static/canvas/workflows/310-clustering.ows b/i18n/si/static/canvas/workflows/si/310-clustering.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/310-clustering.ows
rename to i18n/si/static/canvas/workflows/si/310-clustering.ows
diff --git a/i18n/si/static/canvas/workflows/410-feature-ranking.ows b/i18n/si/static/canvas/workflows/si/410-feature-ranking.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/410-feature-ranking.ows
rename to i18n/si/static/canvas/workflows/si/410-feature-ranking.ows
diff --git a/i18n/si/static/canvas/workflows/450-cross-validation.ows b/i18n/si/static/canvas/workflows/si/450-cross-validation.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/450-cross-validation.ows
rename to i18n/si/static/canvas/workflows/si/450-cross-validation.ows
diff --git a/i18n/si/static/canvas/workflows/470-misclassification-scatterplot.ows b/i18n/si/static/canvas/workflows/si/470-misclassification-scatterplot.ows
similarity index 100%
rename from i18n/si/static/canvas/workflows/470-misclassification-scatterplot.ows
rename to i18n/si/static/canvas/workflows/si/470-misclassification-scatterplot.ows
diff --git a/i18n/si/trubar-config.yaml b/i18n/si/trubar-config.yaml
deleted file mode 100644
index 2d1c8ff0cc1..00000000000
--- a/i18n/si/trubar-config.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-auto-import: "from orangecanvas.utils.localization.si import plsi, plsi_sz, z_besedo # pylint: disable=wrong-import-order"
-encoding: "utf-8"
diff --git a/i18n/trans.sh b/i18n/trans.sh
index 26750b17e16..42fba294866 100755
--- a/i18n/trans.sh
+++ b/i18n/trans.sh
@@ -1,10 +1,8 @@
-if [ "$#" -ne 2 ]
+if [ "$#" -ne 1 ]
then
- echo "trans "
+ echo "trans "
exit
else
- lang=$1
- dest=$2
- trubar --conf $lang/trubar-config.yaml translate -s ../Orange -d $dest/Orange --static $lang/static $lang/msgs.jaml
- trubar --conf $lang/tests-config.yaml translate -s ../Orange -d $dest/Orange $lang/tests-msgs.jaml
+ dest=$1
+ trubar --conf trubar-config.yaml translate -s ../Orange -d $dest/Orange msgs.jaml
fi
diff --git a/i18n/trans1.sh b/i18n/trans1.sh
new file mode 100755
index 00000000000..26750b17e16
--- /dev/null
+++ b/i18n/trans1.sh
@@ -0,0 +1,10 @@
+if [ "$#" -ne 2 ]
+then
+ echo "trans "
+ exit
+else
+ lang=$1
+ dest=$2
+ trubar --conf $lang/trubar-config.yaml translate -s ../Orange -d $dest/Orange --static $lang/static $lang/msgs.jaml
+ trubar --conf $lang/tests-config.yaml translate -s ../Orange -d $dest/Orange $lang/tests-msgs.jaml
+fi
diff --git a/i18n/trubar-config.yaml b/i18n/trubar-config.yaml
new file mode 100644
index 00000000000..0479f418995
--- /dev/null
+++ b/i18n/trubar-config.yaml
@@ -0,0 +1,13 @@
+languages:
+ en:
+ name: English
+ original: true
+ si:
+ name: Slovenščina
+ international-name: Slovenian
+ auto-import: from orangecanvas.utils.localization.si import plsi, plsi_sz, z_besedo # pylint: disable=wrong-import-order
+auto-import: |2
+ from orangecanvas.utils.localization import Translator # pylint: disable=wrong-import-order
+ _tr = Translator("Orange", "biolab.si", "Orange")
+ del Translator
+encoding: "utf-8"
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 1d45cca96f5..2b71a29257e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,6 +6,7 @@ requires = [
"setuptools>=51.0",
"sphinx",
"wheel",
+ "trubar>=0.3.4"
]
build-backend = "setuptools.build_meta"
diff --git a/requirements-gui.txt b/requirements-gui.txt
index e94cc275c9c..ae9adc262e8 100644
--- a/requirements-gui.txt
+++ b/requirements-gui.txt
@@ -1,4 +1,4 @@
-orange-canvas-core>=0.2a,<0.3a
+orange-canvas-core>=0.2.2,<0.3a
orange-widget-base>=4.23.0
AnyQt>=0.2.0
diff --git a/setup.py b/setup.py
index 6e65eafd118..293462513c6 100755
--- a/setup.py
+++ b/setup.py
@@ -4,12 +4,14 @@
import sys
import subprocess
from setuptools import setup, find_packages, Command
+from setuptools.command.install import install
from distutils.command import install_data, sdist
from distutils.command.build_ext import build_ext
from distutils.command import config, build
from distutils.core import Extension
+from trubar import translate
try:
import numpy
@@ -473,9 +475,23 @@ def ext_modules():
return modules
+class InstallMultilingualCommand(install):
+ def run(self):
+ super().run()
+ self.compile_to_multilingual()
+
+ def compile_to_multilingual(self):
+ package_dir = os.path.dirname(os.path.abspath(__file__))
+ translate(
+ "msgs.jaml",
+ source_dir=os.path.join(self.install_lib, "Orange"),
+ config_file=os.path.join(package_dir, "i18n", "trubar-config.yaml"))
+
+
def setup_package():
write_version_py()
cmdclass = {
+ 'install': InstallMultilingualCommand,
'lint': LintCommand,
'coverage': CoverageCommand,
'config': config,
diff --git a/tox.ini b/tox.ini
index 042b62bff57..2798b57cb13 100644
--- a/tox.ini
+++ b/tox.ini
@@ -36,7 +36,7 @@ deps =
latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core
latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base
# GUI requirements
- oldest: orange-canvas-core==0.2.0
+ oldest: orange-canvas-core==0.2.2
oldest: orange-widget-base==4.23.0
oldest: AnyQt==0.2.0
oldest: matplotlib==3.2.0