mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
126 lines
5.1 KiB
Python
126 lines
5.1 KiB
Python
# Translate.py -- Pamhyr
|
|
# Copyright (C) 2023-2026 INRAE
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from PyQt5.QtCore import QCoreApplication
|
|
|
|
from View.Tools.PamhyrTranslate import PamhyrTranslate
|
|
|
|
_translate = QCoreApplication.translate
|
|
|
|
|
|
class RunSolverTranslate(PamhyrTranslate):
|
|
def __init__(self):
|
|
super(RunSolverTranslate, self).__init__()
|
|
|
|
self._dict["invalid_options"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key}: expected three digits, each 1 or 2, "
|
|
"Select valid options in the parameters (tab Solid Transport)."
|
|
)
|
|
self._dict["unsupported_transport_law"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key}: unsupported transport law {value!r}. "
|
|
"Please choose another transport law from the list."
|
|
)
|
|
self._dict["warning"] = _translate("Solver", "Warning: {message}")
|
|
self._dict["incompatible_upstream_boundary"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: REGIME=1 is incompatible with CONDAM=0. "
|
|
"A reflecting upstream boundary cannot impose the water depth."
|
|
)
|
|
self._dict["missing_tcadim"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key}: the selected transport law and options "
|
|
"use a dimensionless critical stress given by the user. "
|
|
"Fill it in the parameters (tab Solid Transport)."
|
|
)
|
|
self._dict["missing_solid_boundary"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: sediment transport (TRASED) is enabled but "
|
|
"no solid boundary condition is defined at the upstream node "
|
|
"of reach(es): {reaches}. Add a solid boundary condition, or "
|
|
"disable sediment transport in the solver parameters."
|
|
)
|
|
self._dict["multireach_unsupported"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the Rubar export supports a single reach, "
|
|
"{count} enabled reaches found."
|
|
)
|
|
self._dict["not_enough_profiles"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: reach {reach} needs at least two profiles."
|
|
)
|
|
self._dict["rk_not_increasing"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the profiles of reach {reach} must have "
|
|
"strictly increasing rk. Sort the profiles of the geometry."
|
|
)
|
|
self._dict["boundary_code_unsupported"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key}={value} is not supported by the Rubar "
|
|
"export (single reach)."
|
|
)
|
|
self._dict["boundary_missing"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {setting} requires a {kind} boundary "
|
|
"condition at node {node}."
|
|
)
|
|
self._dict["boundary_unexpected"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: boundary condition {name} ({kind}) at node "
|
|
"{node} is not used with {setting}. Remove it or change the "
|
|
"boundary settings in the solver parameters."
|
|
)
|
|
self._dict["boundary_ambiguous"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: several {kind} boundary conditions at node "
|
|
"{node}."
|
|
)
|
|
self._dict["boundary_empty"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: boundary condition {name} at node {node} "
|
|
"has no value."
|
|
)
|
|
self._dict["boundary_not_sorted"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the times of boundary condition {name} at "
|
|
"node {node} must be increasing."
|
|
)
|
|
self._dict["upstream_level_unused"] = _translate(
|
|
"Solver",
|
|
"The upstream water level (REGIME=1 or CONDAM=2) is not used "
|
|
"by the current RubarBE version: the computation ignores it."
|
|
)
|
|
self._dict["missing_friction"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: no friction defined on reach {reach}."
|
|
)
|
|
self._dict["missing_initial_conditions"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: no initial condition defined on reach "
|
|
"{reach}."
|
|
)
|
|
self._dict["discharge_out_of_range"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: initial discharges of reach {reach} must be "
|
|
"greater than -500 m3/s."
|
|
)
|
|
self._dict["export_failed"] = _translate(
|
|
"Solver", "Export failed; task cancelled"
|
|
)
|