Skip to content

Commit

Permalink
removed i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
marscher committed Dec 4, 2023
1 parent 6ac619c commit e0b7a85
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 405 deletions.
11 changes: 5 additions & 6 deletions weldx_widgets/kisa/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import weldx_widgets
import weldx_widgets.widget_base
import weldx_widgets.widget_factory
from weldx_widgets.translation_utils import _i18n as _
from weldx_widgets.widget_factory import button_layout

__all__ = [
Expand Down Expand Up @@ -50,7 +49,7 @@ def get_param_from_env(name, default=None) -> str:
raise RuntimeError(
f"parameter '{name}' unset and no default provided."
f" Given parameters: {parameters}"
)
) from None
return value


Expand Down Expand Up @@ -170,7 +169,7 @@ def __init__(

if not disable_next_button:
self.btn_next = w.Button(
description=_(next_notebook_desc), layout=button_layout
description=next_notebook_desc, layout=button_layout
)
if next_notebook_params is None:
next_notebook_params = dict()
Expand All @@ -183,7 +182,7 @@ def __init__(
path = str(fn_path.parent)
fn = str(fn_path.name)
self.save_button = weldx_widgets.WidgetSaveButton(
desc="1." + _("Save") if not disable_next_button else _("Save"),
desc="1. Save" if not disable_next_button else "Save",
filename=fn,
path=path,
select_default=True,
Expand Down Expand Up @@ -225,8 +224,8 @@ def show_header(handle):
# open (existing) file and update it.
if pathlib.Path(self.filename).stem.endswith("_r"):
with self.out:
print("Refusing to save a read-only (template) file!")
print("Please choose another name with the '_r' suffix.")
print("Refusing to save a read-only (template) file!") # noqa: T201
print("Please choose another name with the '_r' suffix.") # noqa: T201
return
if self.filename != self._initial_file:
# we want to save the previous file under a different name, so load contents
Expand Down
9 changes: 4 additions & 5 deletions weldx_widgets/kisa/widget_robot_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from weldx import Q_, WeldxFile
from weldx.tags.core.file import ExternalFile
from weldx_widgets.generic import download_button
from weldx_widgets.translation_utils import _i18n as _
from weldx_widgets.widget_base import WidgetMyVBox
from weldx_widgets.widget_factory import FloatWithUnit, make_title

Expand Down Expand Up @@ -64,10 +63,10 @@ def __init__(
*xyz,
]
)
self.jobname = widgets.Text(description=_("Jobname"), value="MAIN_LINEAR_NEW")
self.jobname = widgets.Text(description="Jobname", value="MAIN_LINEAR_NEW")

self.button_create = Button(
description=_("Create program"),
description="Create program",
)
self.button_create.on_click(self.create_linear_program)

Expand All @@ -79,7 +78,7 @@ def __init__(

super().__init__(
children=[
make_title(_("Create Yaskawa program (linear seam)")),
make_title("Create Yaskawa program (linear seam)"),
self.uf_to_workpiece,
self.jobname,
self.button_create,
Expand Down Expand Up @@ -110,7 +109,7 @@ def create_linear_program(self, button):
download_button(
output,
filename=f"{self.jobname.value}.JBI",
button_description=_("Download program"),
button_description="Download program",
html_instance=dl_button,
)

Expand Down
Loading

0 comments on commit e0b7a85

Please sign in to comment.