mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
306 lines
13 KiB
Python
306 lines
13 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["solid_boundary_downstream"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: solid boundary condition {name} at node "
|
|
"{node}: RubarBE only reads a solid boundary condition at the "
|
|
"upstream node. Remove it."
|
|
)
|
|
self._dict["solid_boundary_too_long"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: solid boundary condition {name} at node "
|
|
"{node} has {count} points, RubarBE accepts at most {maximum}."
|
|
)
|
|
self._dict["save_list_invalid"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key}: '{value}' is not a valid value. "
|
|
"Separate the values with spaces or semicolons, use a dot as "
|
|
"decimal separator, and give the times in seconds or "
|
|
"days:hours:minutes:seconds."
|
|
)
|
|
self._dict["save_list_too_long"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {key} has {count} values, RubarBE accepts "
|
|
"at most {maximum}."
|
|
)
|
|
self._dict["save_list_required"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {flag} is enabled but {key} is empty. Fill "
|
|
"it in the solver parameters (tab Saves), or disable {flag}."
|
|
)
|
|
self._dict["abshyd_outside"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: rubarbe_abshyd: abscissa {rk} is outside "
|
|
"reach {reach}, whose sections go from {first} to {last}."
|
|
)
|
|
self._dict["tnprof_outside"] = _translate(
|
|
"Solver",
|
|
"rubarbe_tnprof: times {times} s are outside the computation, "
|
|
"from {tinit} s to {tmax} s. RubarBE saves the earlier ones at "
|
|
"the first time steps and never reaches the later ones."
|
|
)
|
|
self._dict["solid_boundary_invalid"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: solid boundary condition {name} at node "
|
|
"{node} must have D50 > 0 m and sigma >= 1 (1 for a uniform "
|
|
"sediment)."
|
|
)
|
|
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["structure_section"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the section of hydraulic structure {name} is "
|
|
"not a profile of reach {reach}."
|
|
)
|
|
self._dict["structure_empty_ignored"] = _translate(
|
|
"Solver",
|
|
"Hydraulic structure {name} has no enabled basic structure "
|
|
"that RubarBE takes into account: it is ignored."
|
|
)
|
|
self._dict["structure_too_many"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: hydraulic structure {name} has {count} "
|
|
"enabled basic structures, RubarBE accepts at most {maximum}."
|
|
)
|
|
self._dict["structure_too_many_structures"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {count} hydraulic structures, RubarBE accepts "
|
|
"at most {maximum}."
|
|
)
|
|
self._dict["structure_same_section"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: hydraulic structures {first} and {second} are "
|
|
"on the same section (rk {rk}). Put their basic structures in a "
|
|
"single hydraulic structure."
|
|
)
|
|
self._dict["structure_type_ignored"] = _translate(
|
|
"Solver",
|
|
"Basic structure {name} of type {type} has no RubarBE "
|
|
"equivalent: it is not taken into account. RubarBE accepts "
|
|
"discharge weirs (S1), rectangular orifices (OR) and circular "
|
|
"orifices (OC)."
|
|
)
|
|
self._dict["structure_maximal_loading"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: rectangular orifice {name}: RubarBE has no "
|
|
"maximal loading elevation. Leave it at 9999.999."
|
|
)
|
|
self._dict["structure_siltation"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: circular orifice {name}: RubarBE has no "
|
|
"siltation height. Set it to 0."
|
|
)
|
|
self._dict["structure_invalid"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: basic structure {name} must have a width (or "
|
|
"diameter) > 0 and a discharge coefficient > 0."
|
|
)
|
|
self._dict["structure_loading_below"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: basic structure {name}: the loading elevation "
|
|
"must be above the weir elevation."
|
|
)
|
|
self._dict["structure_format"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: a value of basic structure {name} does not fit "
|
|
"the 10 columns of RubarBE (3 decimals)."
|
|
)
|
|
self._dict["lateral_empty_ignored"] = _translate(
|
|
"Solver",
|
|
"Lateral contribution {name} on reach {reach} has no value: it "
|
|
"is ignored."
|
|
)
|
|
self._dict["lateral_solid_unsupported"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: solid or suspension lateral contribution "
|
|
"{name} on reach {reach}: RubarBE only reads the sediment of a "
|
|
"liquid inflow, which Pamhyr2 cannot link to it. Remove it."
|
|
)
|
|
self._dict["lateral_iodev_disabled"] = _translate(
|
|
"Solver",
|
|
"Lateral contribution {name} on reach {reach} is not taken into "
|
|
"account: lateral overflows (rubarbe_iodev) are disabled in the "
|
|
"solver parameters."
|
|
)
|
|
self._dict["lateral_type_unsupported"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: lateral contribution {name} on reach {reach} "
|
|
"has no type. Choose a type (lateral sources, rain or "
|
|
"evaporation)."
|
|
)
|
|
self._dict["lateral_sections"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the sections of lateral contribution {name} "
|
|
"are not profiles of reach {reach}."
|
|
)
|
|
self._dict["lateral_not_sorted"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the times of lateral contribution {name} on "
|
|
"reach {reach} must be increasing."
|
|
)
|
|
self._dict["lateral_overlap"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: lateral contributions {first} and {second} "
|
|
"on reach {reach} overlap, which RubarBE does not accept. Merge "
|
|
"them or move one of them."
|
|
)
|
|
self._dict["lateral_too_long"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: the lateral contributions give {count} values "
|
|
"(number of points times number of cells of their zone), "
|
|
"RubarBE accepts at most {maximum}."
|
|
)
|
|
self._dict["boundary_empty_ignored"] = _translate(
|
|
"Solver",
|
|
"Boundary condition {name} at node {node} has no value: it is "
|
|
"ignored."
|
|
)
|
|
self._dict["boundary_missing_empty"] = _translate(
|
|
"Solver",
|
|
"Empty boundary condition(s) ignored: {names}."
|
|
)
|
|
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_unsupported"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: {setting} imposes an upstream water level, "
|
|
"which the current RubarBE version reads but does not use in "
|
|
"the computation. Choose another upstream boundary setting."
|
|
)
|
|
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["duplicate_point_name"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: several points are named '{name}' in "
|
|
"profile {profile} of reach {reach}."
|
|
)
|
|
self._dict["main_channel"] = _translate("Solver", "main channel")
|
|
self._dict["active_bed"] = _translate("Solver", "active bed")
|
|
self._dict["bed_limits_invalid"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: in profile {profile} of reach {reach}, the "
|
|
"{bed} limits (points '{left}' and '{right}', or the profile "
|
|
"ends) must be ordered from left to right with at least one "
|
|
"point between them."
|
|
)
|
|
self._dict["missing_sediment_layers"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: point {point} of profile {profile} of reach "
|
|
"{reach} has no sediment layer, which the sediment transport "
|
|
"requires."
|
|
)
|
|
self._dict["invalid_sediment_layer"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: layer '{layer}' of sediment layers '{sl}' "
|
|
"(profile {profile} of reach {reach}) must have a thickness "
|
|
">= 0, D50 > 0 m, sigma >= 1 (1 for a uniform sediment) and a "
|
|
"critical constraint >= 0 Pa."
|
|
)
|
|
self._dict["too_many_compartments"] = _translate(
|
|
"Solver",
|
|
"Export cancelled: sediment layers '{sl}' (profile {profile} of "
|
|
"reach {reach}) give {count} compartments, RubarBE accepts at "
|
|
"most {maximum}. A non erodible compartment is added under an "
|
|
"erodible last layer."
|
|
)
|
|
self._dict["export_failed"] = _translate(
|
|
"Solver", "Export failed; task cancelled"
|
|
)
|