Files
qelectrotech-source-mirror/sources/ui/xrefpropertieswidget.ui
T
Kellermorph 9771ca96c9 Make the cable feature speak English like the rest of the interface
English has been the source language of the program for a while now
(upstream: "Make English the source language ..."), the cable feature
came in with French ones: about 200 translatable strings over 30 files,
the two settings pages built from .ui files, four comments and one test
which asserted the old wording (blocking review comment by ispyisail).

The wording follows what the code base already uses where it exists:
Plant (=) and Location (+) as qetinformation.cpp names those element
information, Designation for the field the cable form calls its BMK,
Length, Sheet for folio, Automatic numbering, Cross-reference, and Right
aligned / Centred / Left aligned the way cabletextformatdialog.cpp
already spells the three alignment entries.

Two things are more than a word-for-word swap:

- xrefpropertieswidget.cpp:291 wrote the label of the master field on
  every type change with a hardcoded tr("Maitre"), so the English
  "Master" coming from the .ui was overwritten for every type, cable or
  not: a real bug next to being French. The wording now comes back from
  the .ui and only a cable renames the field to "Text:", so the two
  cannot drift apart again.

- tst_cabletypelist kept asserting that a new catalogue is *labelled*
  in French. That label line is the translated header and reads English
  now. The test still reads files with French headers on purpose:
  headerAliasMap() keeps the five old French labels as aliases next to
  the English ones, so catalogues written by earlier builds, including
  the one the reviewer reads her own types from, keep loading.

The .ts files are deliberately not regenerated here. Upstream
regenerates them on master, as it did for the language change itself,
and a translation is keyed on the source string: while the sources were
French a German user saw French in the cable dialogs, and an English
source string with no translation yet shows as it is.

Build clean, ctest 92/93, the one failure being the pre-existing
headless tst_menubarkeyboard.
2026-10-10 13:48:45 +02:00

369 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>XRefPropertiesWidget</class>
<widget class="QWidget" name="XRefPropertiesWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>376</width>
<height>531</height>
</rect>
</property>
<property name="windowTitle">
<string>Properties cross references</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Type:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_type_cb"/>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="m_display_gb">
<property name="title">
<string>Representation:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Positioning :</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_snap_to_cb"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>XRef Vertical Offset:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="m_offset_sb">
<property name="toolTip">
<string>10px corresponds to 1 tile displacement</string>
</property>
<property name="whatsThis">
<string>Set Vertical Offset for the Cross References. 10px corresponds to 1 tile displacement.</string>
</property>
<property name="specialValueText">
<string>Default - Fit to XRef height</string>
</property>
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="suffix">
<string notr="true">px</string>
</property>
<property name="minimum">
<number>40</number>
</property>
<property name="maximum">
<number>300</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>40</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="m_stack_overlapping_cb">
<property name="toolTip">
<string>When the texts of two cross-references overlap, the one of the higher element is placed above the other.</string>
</property>
<property name="text">
<string>Stack references whose texts overlap</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>XRef slave position</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_xrefpos_cb"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>Distance label - slave :</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="m_slave_offset_sb">
<property name="toolTip">
<string>Distance in pixels between the label and the slave cross reference</string>
</property>
<property name="suffix">
<string notr="true">px</string>
</property>
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="minimum">
<number>-50</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="m_show_terminal_name_cb">
<property name="text">
<string>Display terminal numbers in Xrefs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="m_show_all_slaves_cb">
<property name="toolTip">
<string>Show in the contact comb all slave contacts defined by the master, even those not yet connected, in the order defined by the master</string>
</property>
<property name="text">
<string>Show all slaves defined by the master</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_display_has_contacts_rb">
<property name="text">
<string>&amp;View contacts</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_display_has_cross_rb">
<property name="text">
<string>View cross</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QGroupBox" name="m_labels_gb">
<property name="title">
<string>Label cross reference</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Master</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_master_le">
<property name="inputMask">
<string/>
</property>
<property name="text">
<string>%f-%l%c</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_font_pb">
<property name="toolTip">
<string>Choose the font and size of the cable cross-reference text</string>
</property>
<property name="text">
<string>Font…</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="m_slave_row">
<item>
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Slave</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_slave_le">
<property name="text">
<string>(%f-%l%c)</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Create your own text using the following variables:
%f: the sheet number
%F: the sheet label
%l: the row number
%c: the column number
%M: the installation
%LM: the location</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="m_cross_properties_gb">
<property name="title">
<string>Option display cross</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="m_show_power_cb">
<property name="text">
<string>Show the power contacts in the cross</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Prefix of power contacts :</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Prefix delayed contacts :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="m_delay_prefix_le"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="m_power_prefix_le"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Prefix changeover contacts :</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="m_switch_prefix_le"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>m_type_cb</tabstop>
<tabstop>m_snap_to_cb</tabstop>
<tabstop>m_offset_sb</tabstop>
<tabstop>m_stack_overlapping_cb</tabstop>
<tabstop>m_xrefpos_cb</tabstop>
<tabstop>m_display_has_contacts_rb</tabstop>
<tabstop>m_display_has_cross_rb</tabstop>
<tabstop>m_master_le</tabstop>
<tabstop>m_slave_le</tabstop>
<tabstop>m_show_power_cb</tabstop>
<tabstop>m_show_terminal_name_cb</tabstop>
<tabstop>m_show_all_slaves_cb</tabstop>
<tabstop>m_power_prefix_le</tabstop>
<tabstop>m_delay_prefix_le</tabstop>
<tabstop>m_switch_prefix_le</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>