mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 22:24:13 +02:00
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.
This commit is contained in:
@@ -338,11 +338,11 @@ void SelectAutonumW::setSingleRuleMode(bool single)
|
||||
//only shown when there is really a rule to take away -- see
|
||||
//setRuleRemovable.
|
||||
if (single && !m_rule_remove_pb) {
|
||||
m_rule_remove_pb = new QPushButton(tr("Supprimer la règle"), this);
|
||||
m_rule_remove_pb = new QPushButton(tr("Delete the rule"), this);
|
||||
m_rule_remove_pb->setToolTip(tr(
|
||||
"Supprimer la règle de numérotation des câbles : les câbles "
|
||||
"sont à nouveau numérotés comme avant, et la question d'en "
|
||||
"définir une revient au prochain dessin."));
|
||||
"Delete the cable numbering rule: cables are "
|
||||
"numbered again as before, and the question of "
|
||||
"defining one comes back on the next drawing."));
|
||||
m_rule_remove_pb->setObjectName(QStringLiteral("m_rule_remove_pb"));
|
||||
if (ui->m_definition_groupe && ui->m_definition_groupe->layout()) {
|
||||
ui->m_definition_groupe->layout()->addWidget(m_rule_remove_pb);
|
||||
@@ -457,24 +457,24 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button)
|
||||
{
|
||||
QMessageBox::information (
|
||||
this,
|
||||
tr("Câble Autonumérotation",
|
||||
tr("Cable Auto Numbering",
|
||||
"title window"),
|
||||
tr("C'est ici que vous pouvez définir la manière dont seront numérotés les nouveaux câbles.\n"
|
||||
"-Une numérotation est composée d'une variable minimum.\n"
|
||||
"-Vous pouvez ajouter ou supprimer une variable de numérotation par le biais des boutons - et +.\n"
|
||||
"-Une variable de numérotation comprend : un type, une valeur et une incrémentation.\n"
|
||||
tr("This is where you can define how new cables will be numbered.\n"
|
||||
"-A numbering is composed of a minimum variable.\n"
|
||||
"-You can add or delete a dialing variable through the - and + buttons.\n"
|
||||
"-A numbering variable includes: a type, a value and an increment.\n"
|
||||
|
||||
"\n-les types \"Chiffre 1\", \"Chiffre 01\" et \"Chiffre 001\", représentent un type numérique défini dans le champ \"Valeur\", "
|
||||
"qui s'incrémente à chaque nouveau câble de la valeur du champ \"Incrémentation\".\n"
|
||||
"-\"Chiffre 01\" et \"Chiffre 001\", sont respectivement représentés sur le schéma par deux et trois digits minimum.\n"
|
||||
"Si le chiffre défini dans le champ Valeur possède moins de digits que le type choisi,"
|
||||
"celui-ci sera précédé par un ou deux 0 afin de respecter son type.\n"
|
||||
"\n-the \"Digit 1\", \"Digit 01\" and \"Digit 001\" types represent a numeric type defined in the \"Value\" field, "
|
||||
"which is incremented to each new cable by the value of the \"Increment\" field.\n"
|
||||
"-\"Digit 01\" and \"Digit 001\", are respectively represented on the diagram by two and three digits minimum.\n"
|
||||
"If the digit defined in the Value field has fewer digits than the chosen type, it will be preceded by one or two 0s in "
|
||||
"order to respect its type.\n"
|
||||
|
||||
"\n-Le type \"Texte\", représente un texte fixe.\nLe champ \"Incrémentation\" n'est pas utilisé.\n"
|
||||
"\n-Type \"Text\", represents a fixed text.\nThe \"Increment\" field is not used.\n"
|
||||
|
||||
"\n-Le type \"N° folio\" représente le n° du folio en cours.\nLes autres champs ne sont pas utilisés.\n"
|
||||
"\n-The \"Sheet no.\" type represents the number of the current sheet.\nThe other fields are not used.\n"
|
||||
|
||||
"\n-Le type \"Folio\" représente le nom du folio en cours.\nLes autres champs ne sont pas utilisés.",
|
||||
"\n-The \"Sheet\" type represents the name of the current sheet.\nThe other fields are not used.",
|
||||
"help dialog about the cable autonumerotation"
|
||||
));
|
||||
break;
|
||||
|
||||
@@ -167,7 +167,7 @@ CableCreateDialog::CableCreateDialog(Diagram *diagram,
|
||||
*/
|
||||
void CableCreateDialog::build()
|
||||
{
|
||||
setWindowTitle(tr("Câble"));
|
||||
setWindowTitle(tr("Cable"));
|
||||
|
||||
auto *layout = new QVBoxLayout(this);
|
||||
|
||||
@@ -176,14 +176,14 @@ void CableCreateDialog::build()
|
||||
//What this window is for, and how many cores the cable has
|
||||
//right now: the type he picks is measured against that number.
|
||||
const QString name = m_change->type().isEmpty()
|
||||
? tr("(aucun type)") : m_change->type();
|
||||
m_header = new QLabel(tr("Changer le type : %1, %n âme(s)",
|
||||
? tr("(no type)") : m_change->type();
|
||||
m_header = new QLabel(tr("Change the type: %1, %n core(s)",
|
||||
"which type this window changes, and how many cores that cable has now",
|
||||
m_change->coreCount()).arg(name), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_header = new QLabel(tr("%n âme(s) reconnue(s)",
|
||||
m_header = new QLabel(tr("%n recognized core(s)",
|
||||
"how many cores the line just crossed",
|
||||
m_crossings.size()), this);
|
||||
}
|
||||
@@ -256,10 +256,10 @@ void CableCreateDialog::buildNewTab()
|
||||
layout->setContentsMargins(4, 4, 4, 4);
|
||||
|
||||
auto *search_row = new QHBoxLayout;
|
||||
search_row->addWidget(new QLabel(tr("Rechercher :"), page));
|
||||
search_row->addWidget(new QLabel(tr("Search:"), page));
|
||||
m_new_search = new QLineEdit(page);
|
||||
m_new_search->setClearButtonEnabled(true);
|
||||
m_new_search->setPlaceholderText(tr("Filtrer les types de câbles"));
|
||||
m_new_search->setPlaceholderText(tr("Filter cable types"));
|
||||
search_row->addWidget(m_new_search, 1);
|
||||
layout->addLayout(search_row);
|
||||
|
||||
@@ -268,10 +268,10 @@ void CableCreateDialog::buildNewTab()
|
||||
//being changed rather than drawn -- too few cores to keep this
|
||||
//cable as it stands, since taking such a type takes cores off it.
|
||||
m_new_hide = new QCheckBox(changeMode()
|
||||
? tr("Masquer les types qui ont moins d'âmes "
|
||||
"que ce câble")
|
||||
: tr("Masquer les types qui ont moins d'âmes "
|
||||
"que de conducteurs reconnus"), page);
|
||||
? tr("Hide types which have fewer cores "
|
||||
"than this cable")
|
||||
: tr("Hide types which have fewer cores "
|
||||
"than recognized conductors"), page);
|
||||
m_new_hide->setChecked(true);
|
||||
layout->addWidget(m_new_hide);
|
||||
|
||||
@@ -279,12 +279,12 @@ void CableCreateDialog::buildNewTab()
|
||||
//picked: the user sees the lines crossed out the moment the
|
||||
//checkbox shows them, and asks why straight away.
|
||||
auto *why = new QLabel(changeMode()
|
||||
? tr("Décochez pour voir aussi les types qui ont "
|
||||
"moins d'âmes : en les prenant, les âmes "
|
||||
"au-delà de leur nombre quittent le câble.")
|
||||
: tr("Une ligne barrée est un type qui a moins "
|
||||
"d'âmes que de conducteurs reconnus : il ne "
|
||||
"peut pas porter ce câble."), page);
|
||||
? tr("Uncheck to also see the types which have "
|
||||
"fewer cores: taking them makes the cores "
|
||||
"beyond their number leave the cable.")
|
||||
: tr("A struck through line is a type which has "
|
||||
"fewer cores than recognized conductors: it "
|
||||
"cannot carry this cable."), page);
|
||||
why->setWordWrap(true);
|
||||
layout->addWidget(why);
|
||||
|
||||
@@ -316,15 +316,15 @@ void CableCreateDialog::buildNewTab()
|
||||
//would then be nothing to rewrite.
|
||||
auto *add_row = new QHBoxLayout;
|
||||
add_row->addStretch(1);
|
||||
auto *add_button = new QPushButton(tr("Nouvelle entrée"), page);
|
||||
add_button->setToolTip(tr("Ajouter un nouveau type de câble à la liste"));
|
||||
auto *add_button = new QPushButton(tr("New entry"), page);
|
||||
add_button->setToolTip(tr("Add a new cable type to the list"));
|
||||
connect(add_button, &QPushButton::clicked,
|
||||
this, &CableCreateDialog::addTypeRecord);
|
||||
add_row->addWidget(add_button);
|
||||
|
||||
m_edit_button = new QPushButton(tr("Modifier l'entrée"), page);
|
||||
m_edit_button->setToolTip(tr("Modifier le type de câble sélectionné dans "
|
||||
"la liste."));
|
||||
m_edit_button = new QPushButton(tr("Edit entry"), page);
|
||||
m_edit_button->setToolTip(tr("Edit the cable type selected in "
|
||||
"the list."));
|
||||
m_edit_button->setEnabled(false);
|
||||
connect(m_edit_button, &QPushButton::clicked,
|
||||
this, &CableCreateDialog::editTypeRecord);
|
||||
@@ -332,7 +332,7 @@ void CableCreateDialog::buildNewTab()
|
||||
|
||||
layout->addLayout(add_row);
|
||||
|
||||
m_tabs->addTab(page, tr("Nouveau câble"));
|
||||
m_tabs->addTab(page, tr("New cable"));
|
||||
|
||||
connect(m_new_search, &QLineEdit::textChanged, this, [this](const QString &text) {
|
||||
m_new_proxy->setTokens(text.split(QLatin1Char(' '), Qt::SkipEmptyParts));
|
||||
@@ -365,23 +365,23 @@ void CableCreateDialog::buildExistingTab()
|
||||
layout->setContentsMargins(4, 4, 4, 4);
|
||||
|
||||
auto *search_row = new QHBoxLayout;
|
||||
search_row->addWidget(new QLabel(tr("Rechercher :"), page));
|
||||
search_row->addWidget(new QLabel(tr("Search:"), page));
|
||||
m_existing_search = new QLineEdit(page);
|
||||
m_existing_search->setClearButtonEnabled(true);
|
||||
m_existing_search->setPlaceholderText(tr("Filtrer les câbles existants"));
|
||||
m_existing_search->setPlaceholderText(tr("Filter existing cables"));
|
||||
search_row->addWidget(m_existing_search, 1);
|
||||
layout->addLayout(search_row);
|
||||
|
||||
m_existing_hide = new QCheckBox(tr("Masquer les câbles qui ont moins "
|
||||
"d'adresses libres que de conducteurs reconnus"), page);
|
||||
m_existing_hide = new QCheckBox(tr("Hide cables which have fewer "
|
||||
"free cores than recognized conductors"), page);
|
||||
m_existing_hide->setChecked(true);
|
||||
layout->addWidget(m_existing_hide);
|
||||
|
||||
//Same as on the first tab: the reason a line is crossed out is
|
||||
//said where the crossed out lines appear, not only afterwards.
|
||||
auto *why = new QLabel(tr("Une ligne barrée est un câble qui a moins "
|
||||
"d'adresses libres que de conducteurs "
|
||||
"reconnus : il ne peut pas les recevoir."), page);
|
||||
auto *why = new QLabel(tr("A struck through line is a cable which has "
|
||||
"fewer free cores than recognized "
|
||||
"conductors: it cannot receive them."), page);
|
||||
why->setWordWrap(true);
|
||||
layout->addWidget(why);
|
||||
|
||||
@@ -405,7 +405,7 @@ void CableCreateDialog::buildExistingTab()
|
||||
m_existing_note->setVisible(false);
|
||||
layout->addWidget(m_existing_note);
|
||||
|
||||
m_tabs->addTab(page, tr("Câbles existants"));
|
||||
m_tabs->addTab(page, tr("Existing cables"));
|
||||
|
||||
connect(m_existing_search, &QLineEdit::textChanged, this, [this](const QString &text) {
|
||||
m_existing_proxy->setTokens(text.split(QLatin1Char(' '), Qt::SkipEmptyParts));
|
||||
@@ -445,9 +445,9 @@ void CableCreateDialog::buildPropertyRow()
|
||||
m_installation = new QLineEdit(m_property_row);
|
||||
m_location = new QLineEdit(m_property_row);
|
||||
|
||||
form->addRow(tr("Désignation"), m_designation);
|
||||
form->addRow(tr("Installation (=)"), m_installation);
|
||||
form->addRow(tr("Localisation (+)"), m_location);
|
||||
form->addRow(tr("Designation"), m_designation);
|
||||
form->addRow(tr("Plant (=)"), m_installation);
|
||||
form->addRow(tr("Location (+)"), m_location);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -528,11 +528,11 @@ void CableCreateDialog::refreshExisting()
|
||||
if (!m_diagram || !m_diagram->project()) return;
|
||||
|
||||
m_existing_model->setHorizontalHeaderLabels({
|
||||
tr("Désignation"),
|
||||
tr("Designation"),
|
||||
tr("Type"),
|
||||
tr("Âmes"),
|
||||
tr("Installation"),
|
||||
tr("Localisation")
|
||||
tr("Cores"),
|
||||
tr("Plant"),
|
||||
tr("Location")
|
||||
});
|
||||
|
||||
const int needed = m_crossings.size();
|
||||
@@ -606,21 +606,21 @@ QString CableCreateDialog::unsuitableNote() const
|
||||
//loud before he says yes to it.
|
||||
if (changeMode())
|
||||
{
|
||||
return tr("Ce type a moins d'âmes que ce câble : %1 au lieu de %2. "
|
||||
"Les âmes au-delà de %1 quittent le câble et leurs marques "
|
||||
"disparaissent du tracé.")
|
||||
return tr("This type has fewer cores than this cable: %1 instead of %2. "
|
||||
"The cores beyond %1 leave the cable and their marks "
|
||||
"disappear from the drawing.")
|
||||
.arg(cores)
|
||||
.arg(needed);
|
||||
}
|
||||
|
||||
return tr("Trop d'âmes sélectionnées : le type n'en propose que %1, "
|
||||
"%2 conducteurs sont reconnus")
|
||||
return tr("Too many cores selected: the type offers only %1, "
|
||||
"%2 conductors are recognized")
|
||||
.arg(cores)
|
||||
.arg(needed);
|
||||
}
|
||||
|
||||
const Cable *cable = m_existing.value(index.row());
|
||||
return tr("Seulement %1 adresses libres, %2 demandées")
|
||||
return tr("Only %1 free cores, %2 requested")
|
||||
.arg(cable ? cable->freeCoreCount() : 0)
|
||||
.arg(needed);
|
||||
}
|
||||
@@ -649,8 +649,8 @@ void CableCreateDialog::selectionChanged()
|
||||
|
||||
if (on_new_tab && m_types.columns.isEmpty())
|
||||
{
|
||||
note->setText(tr("Aucun type de câble disponible : configurez le fichier "
|
||||
"des types de câbles dans les préférences."));
|
||||
note->setText(tr("No cable type available: configure the cable "
|
||||
"type file in the preferences."));
|
||||
note->show();
|
||||
acceptable = false;
|
||||
}
|
||||
@@ -664,8 +664,8 @@ void CableCreateDialog::selectionChanged()
|
||||
}
|
||||
else if (!acceptable)
|
||||
{
|
||||
note->setText(on_new_tab ? tr("Choisissez un type de câble.")
|
||||
: tr("Choisissez un câble existant."));
|
||||
note->setText(on_new_tab ? tr("Choose a cable type.")
|
||||
: tr("Choose an existing cable."));
|
||||
note->show();
|
||||
}
|
||||
|
||||
@@ -678,8 +678,8 @@ void CableCreateDialog::selectionChanged()
|
||||
const int cores = CableTypeList::coreCount(m_types.records.at(index.row()));
|
||||
if (cores > m_change->coreCount())
|
||||
{
|
||||
note->setText(tr("%1 âme(s) au lieu de %2 : les âmes supplémentaires "
|
||||
"restent sans être placées.")
|
||||
note->setText(tr("%1 cores instead of %2: the extra cores "
|
||||
"stay unplaced.")
|
||||
.arg(cores)
|
||||
.arg(m_change->coreCount()));
|
||||
note->show();
|
||||
@@ -910,12 +910,12 @@ void CableCreateDialog::accept()
|
||||
if (!m_taken.isEmpty())
|
||||
{
|
||||
const QString text = tr(
|
||||
"%n conducteur(s) traversé(s) déjà rattaché(s) à un autre câble\n\n"
|
||||
"En validant, l'autre câble perdra ces âmes. Voulez-vous continuer ?",
|
||||
"%n crossed conductor(s) already bound to another cable\n\n"
|
||||
"If you confirm, the other cable will lose these cores. Do you want to continue?",
|
||||
"ask before taking cores away from another cable",
|
||||
m_taken.size());
|
||||
|
||||
if (QMessageBox::warning(this, tr("Câble"), text,
|
||||
if (QMessageBox::warning(this, tr("Cable"), text,
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No) != QMessageBox::Yes) {
|
||||
m_taken.clear();
|
||||
@@ -1013,8 +1013,8 @@ void CableCreateDialog::addTypeRecord()
|
||||
if (!CableTypeList::appendRecord(path, entry.record(), &error))
|
||||
{
|
||||
QMessageBox::critical(this,
|
||||
tr("Écriture impossible"),
|
||||
tr("Impossible d'écrire dans le fichier :\n%1\n%2")
|
||||
tr("Cannot be written"),
|
||||
tr("Cannot write to the file:\n%1\n%2")
|
||||
.arg(path, error));
|
||||
return;
|
||||
}
|
||||
@@ -1079,8 +1079,8 @@ void CableCreateDialog::editTypeRecord()
|
||||
if (!CableTypeList::updateRecord(path, before, after, &error))
|
||||
{
|
||||
QMessageBox::critical(this,
|
||||
tr("Écriture impossible"),
|
||||
tr("Impossible d'écrire dans le fichier :\n%1\n%2")
|
||||
tr("Cannot be written"),
|
||||
tr("Cannot write to the file:\n%1\n%2")
|
||||
.arg(path, error));
|
||||
return;
|
||||
}
|
||||
@@ -1161,13 +1161,13 @@ void CableCreateDialog::acceptTypeChange()
|
||||
if (wired > 0)
|
||||
{
|
||||
const QString text = tr(
|
||||
"%n âme(s) de ce câble est/sont rattachée(s) à un conducteur. "
|
||||
"Avec le type choisi, elle(s) quitte(nt) ce câble et leur marque "
|
||||
"disparaît du tracé. Continuer ?",
|
||||
"%n core(s) of this cable bound to a conductor. "
|
||||
"With the chosen type, they leave this cable and their mark "
|
||||
"disappears from the drawing. Continue?",
|
||||
"ask before cores lose the mark they show on the drawing",
|
||||
wired);
|
||||
|
||||
if (QMessageBox::warning(this, tr("Câble"), text,
|
||||
if (QMessageBox::warning(this, tr("Cable"), text,
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::Yes) != QMessageBox::Yes) {
|
||||
return;
|
||||
@@ -1209,7 +1209,7 @@ void CableCreateDialog::acceptTypeChange()
|
||||
QUndoCommand *step = steps.size() == 1
|
||||
? steps.takeFirst()
|
||||
: new BatchCommand(steps, QCoreApplication::translate("ChangeCableTypeCommand",
|
||||
"Changer le type du câble"));
|
||||
"Change the cable type"));
|
||||
|
||||
//The folio is the usual place this step is taken back from. When
|
||||
//no folio is known -- a cable picked without a line -- the
|
||||
@@ -1251,12 +1251,12 @@ CableTypeEntryDialog::CableTypeEntryDialog(const QStringList &columns, QWidget *
|
||||
QDialog(parent),
|
||||
m_columns(columns)
|
||||
{
|
||||
setWindowTitle(tr("Nouvelle entrée"));
|
||||
setWindowTitle(tr("New entry"));
|
||||
|
||||
auto *main_layout = new QVBoxLayout(this);
|
||||
|
||||
auto *intro = new QLabel(tr("Renseignez le type de câble à ajouter. Les champs "
|
||||
"laissés vides restent vides dans le fichier."), this);
|
||||
auto *intro = new QLabel(tr("Enter the cable type to add. Fields "
|
||||
"left empty stay empty in the file."), this);
|
||||
intro->setWordWrap(true);
|
||||
m_intro = intro;
|
||||
main_layout->addWidget(intro);
|
||||
@@ -1275,8 +1275,8 @@ CableTypeEntryDialog::CableTypeEntryDialog(const QStringList &columns, QWidget *
|
||||
auto *spin = new QSpinBox(this);
|
||||
spin->setRange(0, 99);
|
||||
spin->setSpecialValueText(QStringLiteral("—"));
|
||||
spin->setToolTip(tr("Combien d'âmes ce type a. Le tiret veut dire que "
|
||||
"le fichier ne le dit pas."));
|
||||
spin->setToolTip(tr("How many cores this type has. The dash means "
|
||||
"the file does not specify."));
|
||||
field = spin;
|
||||
}
|
||||
else
|
||||
@@ -1286,8 +1286,8 @@ CableTypeEntryDialog::CableTypeEntryDialog(const QStringList &columns, QWidget *
|
||||
if (column == QLatin1String("core_colors"))
|
||||
{
|
||||
edit->setPlaceholderText(QStringLiteral("br,sw,gr,bl,gnge"));
|
||||
edit->setToolTip(tr("La couleur de chaque âme, séparées par une "
|
||||
"virgule et dans l'ordre des âmes."));
|
||||
edit->setToolTip(tr("The color of each core, separated by a "
|
||||
"comma and in the order of the cores."));
|
||||
}
|
||||
field = edit;
|
||||
}
|
||||
@@ -1301,8 +1301,8 @@ CableTypeEntryDialog::CableTypeEntryDialog(const QStringList &columns, QWidget *
|
||||
main_layout->addLayout(grid);
|
||||
|
||||
auto *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||
buttons->button(QDialogButtonBox::Ok)->setText(tr("Enregistrer"));
|
||||
buttons->button(QDialogButtonBox::Cancel)->setText(tr("Annuler"));
|
||||
buttons->button(QDialogButtonBox::Ok)->setText(tr("Save"));
|
||||
buttons->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, &CableTypeEntryDialog::accept);
|
||||
connect(buttons, &QDialogButtonBox::rejected, this, &CableTypeEntryDialog::reject);
|
||||
main_layout->addWidget(buttons);
|
||||
@@ -1362,11 +1362,11 @@ CableTypeRecord CableTypeEntryDialog::record() const
|
||||
*/
|
||||
void CableTypeEntryDialog::setValues(const CableTypeRecord &values)
|
||||
{
|
||||
setWindowTitle(tr("Modifier l'entrée"));
|
||||
setWindowTitle(tr("Edit entry"));
|
||||
if (m_intro)
|
||||
{
|
||||
m_intro->setText(tr("Modifiez le type de câble sélectionné dans la liste. "
|
||||
"Les champs laissés vides restent vides dans le fichier."));
|
||||
m_intro->setText(tr("Edit the cable type selected in the list. "
|
||||
"Fields left empty stay empty in the file."));
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_columns.size() && i < m_fields.size(); ++i)
|
||||
@@ -1397,9 +1397,9 @@ void CableTypeEntryDialog::accept()
|
||||
if (record().values.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(this,
|
||||
tr("Aucun renseignement"),
|
||||
tr("Saisissez au moins un renseignement "
|
||||
"pour créer une entrée."));
|
||||
tr("No details"),
|
||||
tr("Enter at least one detail "
|
||||
"to create an entry."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -259,7 +259,7 @@ QFont CablePart::fontOf(const QString &key) const
|
||||
|
||||
//The reference to the other folios this cable runs on has a
|
||||
//font of its own, set with the button next to its text under
|
||||
//Querverweise -- he sets it there and not in the cable itself.
|
||||
//Cross-references -- he sets it there and not in the cable itself.
|
||||
//When he has left that alone, the reference follows the texts
|
||||
//of the cable like every other line of the label does.
|
||||
if (key == QLatin1String("xref") && m_cable && diagram() && diagram()->project())
|
||||
@@ -539,7 +539,7 @@ QList<CablePart::CrossRef> CablePart::crossRefs() const
|
||||
if (elsewhere.isEmpty()) return refs;
|
||||
|
||||
//The format this project asks for such a reference, chosen under
|
||||
//Querverweise for the type "Câble": one text per folio, written
|
||||
//Cross-references for the type "Cable": one text per folio, written
|
||||
//out with that folio's own numbers and fields.
|
||||
const XRefProperties xref = project->defaultXRefProperties(QStringLiteral("cable"));
|
||||
const QString format = xref.masterLabel();
|
||||
@@ -680,7 +680,7 @@ QList<CablePart::PdfRef> CablePart::pdfRefs() const
|
||||
@brief CablePart::setUpXrefHooks
|
||||
Keep the reference lines up to date with what the project does: a
|
||||
folio which is added, removed or moved changes which lines there are
|
||||
and what they say, and so does the format chosen under Querverweise.
|
||||
and what they say, and so does the format chosen under Cross-references.
|
||||
|
||||
Only this line is redrawn, which is enough: the references of a
|
||||
cable are worked out again from the cable itself every time its
|
||||
@@ -1946,7 +1946,7 @@ void CablePart::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
diagram()->undoStack().push(new BatchCommand(
|
||||
pending,
|
||||
QCoreApplication::translate(
|
||||
"BatchCommand", "Déplacer %n câble(s)",
|
||||
"BatchCommand", "Move %n cable(s)",
|
||||
"Un geste déplace plusieurs lignes à la fois.",
|
||||
pending.size())));
|
||||
pending.clear();
|
||||
@@ -2231,7 +2231,7 @@ bool CablePart::rebindCore(int core, const QPointF &dropped_at,
|
||||
//for what it did rather than for where it went.
|
||||
const QString text = before_cores
|
||||
? QCoreApplication::translate("ChangeCableCoresCommand",
|
||||
"Placer une âme de câble")
|
||||
"Place a cable core")
|
||||
: QString();
|
||||
diagram()->undoStack().push(
|
||||
new ChangeCableCoresCommand(m_cable, before, after, text));
|
||||
@@ -2276,7 +2276,7 @@ bool CablePart::takeCoreOffLine(int core)
|
||||
diagram()->undoStack().push(new ChangeCableCoresCommand(
|
||||
m_cable, before, after,
|
||||
QCoreApplication::translate("ChangeCableCoresCommand",
|
||||
"Retirer une âme de la ligne")));
|
||||
"Remove a core from the line")));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2657,13 +2657,13 @@ CablePart::ClaimAnswer CablePart::askClaim(QWidget *parent,
|
||||
{
|
||||
QMessageBox box(QMessageBox::Question, title, question, QMessageBox::NoButton, parent);
|
||||
QPushButton *take = box.addButton(
|
||||
tr("Oui", "Prendre le conducteur à l'autre câble."),
|
||||
tr("Yes", "Prendre le conducteur à l'autre câble."),
|
||||
QMessageBox::YesRole);
|
||||
QPushButton *leave = box.addButton(
|
||||
tr("Non", "Laisser le conducteur à l'autre câble, on ne change rien."),
|
||||
tr("No", "Laisser le conducteur à l'autre câble, on ne change rien."),
|
||||
QMessageBox::NoRole);
|
||||
QPushButton *cancel = box.addButton(
|
||||
tr("Annuler", "Annuler le geste entier : rien n'est écrit, la ligne et ses couleurs reviennent où elles étaient."),
|
||||
tr("Cancel", "Annuler le geste entier : rien n'est écrit, la ligne et ses couleurs reviennent où elles étaient."),
|
||||
QMessageBox::RejectRole);
|
||||
//The safe answer is the one under his finger, and the escape
|
||||
//key throws the whole gesture away rather than taking a wire.
|
||||
@@ -2699,9 +2699,9 @@ CablePart::ClaimAnswer CablePart::mayClaim(Conductor *conductor) const
|
||||
const QString other_name = other ? other->designation() : QString();
|
||||
|
||||
const QString text = other_name.isEmpty()
|
||||
? tr("Ce conducteur est déjà décrit par un autre câble. Voulez-vous l'attribuer au câble %1 ?",
|
||||
? tr("This conductor is already described by another cable. Do you want to assign it to cable %1?",
|
||||
"Un conducteur ne peut appartenir qu'à un câble : on demande avant de le prendre à l'autre.")
|
||||
: tr("Ce conducteur est déjà décrit par le câble %1. Voulez-vous l'attribuer au câble %2 ?",
|
||||
: tr("This conductor is already described by cable %1. Do you want to assign it to cable %2?",
|
||||
"Un conducteur ne peut appartenir qu'à un câble : on demande avant de le prendre à l'autre.");
|
||||
|
||||
QWidget *parent = nullptr;
|
||||
@@ -2710,7 +2710,7 @@ CablePart::ClaimAnswer CablePart::mayClaim(Conductor *conductor) const
|
||||
}
|
||||
|
||||
return askClaim(parent,
|
||||
tr("Conducteur déjà attribué", "Un conducteur ne peut appartenir qu'à un câble."),
|
||||
tr("Conductor already assigned", "Un conducteur ne peut appartenir qu'à un câble."),
|
||||
other_name.isEmpty() ? text.arg(m_cable->designation())
|
||||
: text.arg(other_name, m_cable->designation()));
|
||||
}
|
||||
@@ -2752,19 +2752,19 @@ CablePart::ClaimAnswer CablePart::mayClaimSeveral(const QList<Conductor *> &cond
|
||||
|
||||
const int n = conductors.size();
|
||||
const QString title = n <= 1
|
||||
? tr("Conducteur déjà attribué", "Un conducteur ne peut appartenir qu'à un câble.")
|
||||
: tr("Conducteurs déjà attribués", "Plusieurs conducteurs sont pris en une seule fois.", n);
|
||||
? tr("Conductor already assigned", "Un conducteur ne peut appartenir qu'à un câble.")
|
||||
: tr("Conductors already assigned", "Plusieurs conducteurs sont pris en une seule fois.", n);
|
||||
|
||||
const QString text = n <= 1
|
||||
? (unnamed
|
||||
? tr("Ce conducteur est déjà décrit par un autre câble. Voulez-vous l'attribuer au câble %1 ?",
|
||||
? tr("This conductor is already described by another cable. Do you want to assign it to cable %1?",
|
||||
"Un conducteur ne peut appartenir qu'à un câble : on demande avant de le prendre à l'autre.")
|
||||
: tr("Ce conducteur est déjà décrit par le câble %1. Voulez-vous l'attribuer au câble %2 ?",
|
||||
: tr("This conductor is already described by cable %1. Do you want to assign it to cable %2?",
|
||||
"Un conducteur ne peut appartenir qu'à un câble : on demande avant de le prendre à l'autre."))
|
||||
: (unnamed
|
||||
? tr("%n conducteurs sont déjà décrits par d'autres câbles. Voulez-vous les attribuer au câble %1 ?",
|
||||
? tr("%n conductors are already described by other cables. Do you want to assign them to cable %1?",
|
||||
"On prend plusieurs conducteurs à la fois : on demande avant de les prendre aux autres câbles.", n)
|
||||
: tr("%n conducteurs sont déjà décrits par le câble %1. Voulez-vous les attribuer au câble %2 ?",
|
||||
: tr("%n conductors are already described by cable %1. Do you want to assign them to cable %2?",
|
||||
"On prend plusieurs conducteurs à la fois : on demande avant de les prendre à l'autre câble.", n));
|
||||
|
||||
const QString question = unnamed
|
||||
|
||||
@@ -246,7 +246,7 @@ class CablePart : public QetGraphicsItem
|
||||
runs on besides this one: that folio, the section of the
|
||||
cable standing there, and the text this project asks for
|
||||
such a reference -- the format chosen for the type
|
||||
"Câble" under Querverweise, written out once per folio,
|
||||
"Cable" under Cross-references, written out once per folio,
|
||||
in the order the folios turn.
|
||||
*/
|
||||
struct CrossRef
|
||||
@@ -326,7 +326,7 @@ class CablePart : public QetGraphicsItem
|
||||
/**
|
||||
Keep the reference lines up to date with the project: a
|
||||
folio which is added, removed or moved changes what they
|
||||
say, and so does the format chosen under Querverweise.
|
||||
say, and so does the format chosen under Cross-references.
|
||||
*/
|
||||
void setUpXrefHooks();
|
||||
QString typeText() const;
|
||||
|
||||
@@ -51,7 +51,7 @@ CablePropertiesDialog::CablePropertiesDialog(Cable *cable,
|
||||
m_diagram(diagram),
|
||||
m_part(part)
|
||||
{
|
||||
setWindowTitle(tr("Câble"));
|
||||
setWindowTitle(tr("Cable"));
|
||||
|
||||
auto *layout = new QVBoxLayout(this);
|
||||
m_fields = new CablePropertiesWidget(this);
|
||||
@@ -70,13 +70,13 @@ CablePropertiesDialog::CablePropertiesDialog(Cable *cable,
|
||||
//The cores the type offers which are not on the sheet yet.
|
||||
//Double-clicking one brings it in: the line it was asked from
|
||||
//takes the mouse and the next click puts the core down there.
|
||||
m_free_label = new QLabel(tr("Âmes non placées :"), this);
|
||||
m_free_label = new QLabel(tr("Unplaced cores:"), this);
|
||||
m_free_cores = new QListWidget(this);
|
||||
m_free_cores->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
m_free_cores->setAlternatingRowColors(true);
|
||||
m_free_cores->setToolTip(tr("Double-cliquer sur une âme pour la poser sur la "
|
||||
"ligne : le trait suit la souris et le clic la "
|
||||
"laisse à l'endroit visé."));
|
||||
m_free_cores->setToolTip(tr("Double-click a core to place it on the "
|
||||
"line: the line follows the mouse and a "
|
||||
"click leaves it where you aimed."));
|
||||
m_free_cores->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_free_cores, &QWidget::customContextMenuRequested,
|
||||
this, &CablePropertiesDialog::freeCoreMenu);
|
||||
@@ -114,11 +114,11 @@ void CablePropertiesDialog::updateCoreCount()
|
||||
|
||||
if (!m_cable)
|
||||
{
|
||||
m_cores->setText(tr("Aucun câble."));
|
||||
m_cores->setText(tr("No cable."));
|
||||
return;
|
||||
}
|
||||
|
||||
m_cores->setText(tr("%1 âme(s) sur %2 reliée(s) à un conducteur",
|
||||
m_cores->setText(tr("%1 of %2 cores wired to a conductor",
|
||||
"how many cores of this cable are wired",
|
||||
m_cable->usedCoreCount())
|
||||
.arg(m_cable->usedCoreCount())
|
||||
@@ -168,8 +168,8 @@ void CablePropertiesDialog::fillFreeCores()
|
||||
|
||||
const QString color = m_cable->colorOfCore(i);
|
||||
auto *item = new QListWidgetItem(
|
||||
color.isEmpty() ? tr("Âme %1").arg(i + 1)
|
||||
: tr("Âme %1 — %2").arg(i + 1).arg(color),
|
||||
color.isEmpty() ? tr("Core %1").arg(i + 1)
|
||||
: tr("Core %1 — %2").arg(i + 1).arg(color),
|
||||
m_free_cores);
|
||||
item->setData(Qt::UserRole, i);
|
||||
}
|
||||
@@ -230,7 +230,7 @@ void CablePropertiesDialog::freeCoreMenu(const QPoint &pos)
|
||||
m_free_cores->setCurrentItem(item);
|
||||
|
||||
QMenu menu(m_free_cores);
|
||||
QAction *place = menu.addAction(tr("Placer cette âme sur la ligne"));
|
||||
QAction *place = menu.addAction(tr("Place this core on the line"));
|
||||
place->setIcon(QET::Icons::Cable);
|
||||
|
||||
if (menu.exec(m_free_cores->viewport()->mapToGlobal(pos)) == place) {
|
||||
|
||||
@@ -56,14 +56,14 @@ CablePropertiesEditorWidget::CablePropertiesEditorWidget(Cable *cable,
|
||||
//no keyboard focus, so clicking it never takes the drawing away
|
||||
//from the user -- startPlacingCore() hands the focus to the
|
||||
//sheet itself, which is where Escape has to be heard.
|
||||
m_free_label->setText(tr("Âmes non placées :"));
|
||||
m_free_label->setText(tr("Unplaced cores:"));
|
||||
m_free_label->setVisible(false);
|
||||
m_free_cores->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
m_free_cores->setAlternatingRowColors(true);
|
||||
m_free_cores->setFocusPolicy(Qt::NoFocus);
|
||||
m_free_cores->setToolTip(tr("Double-cliquer sur une âme pour la poser sur la "
|
||||
"ligne : le trait suit la souris et le clic la "
|
||||
"laisse à l'endroit visé."));
|
||||
m_free_cores->setToolTip(tr("Double-click a core to place it on the "
|
||||
"line: the line follows the mouse and a "
|
||||
"click leaves it where you aimed."));
|
||||
m_free_cores->setVisible(false);
|
||||
m_free_cores->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_free_cores, &QWidget::customContextMenuRequested,
|
||||
@@ -255,7 +255,7 @@ void CablePropertiesEditorWidget::updateInfo()
|
||||
{
|
||||
if (!m_cable) return;
|
||||
|
||||
m_info->setText(tr("%1 âme(s) sur %2 reliée(s) à un conducteur",
|
||||
m_info->setText(tr("%1 of %2 cores wired to a conductor",
|
||||
"how many cores of this cable are wired",
|
||||
m_cable->usedCoreCount())
|
||||
.arg(m_cable->usedCoreCount())
|
||||
@@ -289,8 +289,8 @@ void CablePropertiesEditorWidget::updateFreeCores()
|
||||
|
||||
const QString color = m_cable->colorOfCore(i);
|
||||
auto *item = new QListWidgetItem(
|
||||
color.isEmpty() ? tr("Âme %1").arg(i + 1)
|
||||
: tr("Âme %1 — %2").arg(i + 1).arg(color),
|
||||
color.isEmpty() ? tr("Core %1").arg(i + 1)
|
||||
: tr("Core %1 — %2").arg(i + 1).arg(color),
|
||||
m_free_cores);
|
||||
item->setData(Qt::UserRole, i);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void CablePropertiesEditorWidget::freeCoreMenu(const QPoint &pos)
|
||||
m_free_cores->setCurrentItem(item);
|
||||
|
||||
QMenu menu(m_free_cores);
|
||||
QAction *place = menu.addAction(tr("Placer cette âme sur la ligne"));
|
||||
QAction *place = menu.addAction(tr("Place this core on the line"));
|
||||
place->setIcon(QET::Icons::Cable);
|
||||
|
||||
if (menu.exec(m_free_cores->viewport()->mapToGlobal(pos)) == place) {
|
||||
@@ -385,5 +385,5 @@ void CablePropertiesEditorWidget::updateUi()
|
||||
*/
|
||||
QString CablePropertiesEditorWidget::title() const
|
||||
{
|
||||
return tr("Câble");
|
||||
return tr("Cable");
|
||||
}
|
||||
|
||||
@@ -49,16 +49,16 @@ CablePropertiesWidget::CablePropertiesWidget(QWidget *parent) :
|
||||
grid->setHorizontalSpacing(6);
|
||||
grid->setVerticalSpacing(3);
|
||||
|
||||
auto *plan = new QLabel(tr("Plan",
|
||||
auto *plan = new QLabel(tr("Drawing",
|
||||
"column header: the drawing shows this field"), this);
|
||||
plan->setAlignment(Qt::AlignCenter);
|
||||
plan->setToolTip(tr("À cocher pour écrire ce champ sur le plan.",
|
||||
plan->setToolTip(tr("Tick to write this field on the drawing.",
|
||||
"tooltip of the tick before each field"));
|
||||
grid->addWidget(plan, 0, 1, Qt::AlignCenter);
|
||||
|
||||
int row = 1;
|
||||
addField(grid, row++, QStringLiteral("designation"),
|
||||
tr("Désignation"), &m_designation, &m_show_designation);
|
||||
tr("Designation"), &m_designation, &m_show_designation);
|
||||
const int type_row = row;
|
||||
addField(grid, row++, QStringLiteral("type"),
|
||||
tr("Type"), &m_type, &m_show_type);
|
||||
@@ -71,26 +71,26 @@ CablePropertiesWidget::CablePropertiesWidget(QWidget *parent) :
|
||||
auto *pick_type = new QPushButton(this);
|
||||
pick_type->setFocusPolicy(Qt::NoFocus);
|
||||
pick_type->setIcon(QET::Icons::Cable);
|
||||
pick_type->setToolTip(tr("Choisir le type de ce câble dans la liste des "
|
||||
"types de câbles…"));
|
||||
pick_type->setToolTip(tr("Choose the type of this cable from the list of "
|
||||
"cable types…"));
|
||||
connect(pick_type, &QPushButton::clicked,
|
||||
this, &CablePropertiesWidget::typeChangeRequested);
|
||||
grid->addWidget(pick_type, type_row, 4, Qt::AlignRight | Qt::AlignVCenter);
|
||||
|
||||
addField(grid, row++, QStringLiteral("installation"),
|
||||
tr("Installation (=)"), &m_installation, &m_show_installation);
|
||||
tr("Plant (=)"), &m_installation, &m_show_installation);
|
||||
addField(grid, row++, QStringLiteral("location"),
|
||||
tr("Localisation (+)"), &m_location, &m_show_location);
|
||||
tr("Location (+)"), &m_location, &m_show_location);
|
||||
addField(grid, row++, QStringLiteral("length"),
|
||||
tr("Longueur"), &m_length, &m_show_length);
|
||||
tr("Length"), &m_length, &m_show_length);
|
||||
|
||||
//The colours of the cores: one setting for every one of them at
|
||||
//once, since they are written in one row along the line and are
|
||||
//read as one row.
|
||||
auto *cores_label = new QLabel(tr("Couleurs des âmes"), this);
|
||||
auto *cores_label = new QLabel(tr("Core colors"), this);
|
||||
cores_label->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
||||
cores_label->setToolTip(tr("La police des couleurs de toutes les âmes "
|
||||
"de ce câble, écrites le long de la ligne."));
|
||||
cores_label->setToolTip(tr("The font of the colors of all the cores "
|
||||
"of this cable, written along the line."));
|
||||
grid->addWidget(cores_label, row, 0, Qt::AlignRight | Qt::AlignVCenter);
|
||||
addFormatButton(grid, row, QStringLiteral("cores"));
|
||||
|
||||
@@ -98,18 +98,18 @@ CablePropertiesWidget::CablePropertiesWidget(QWidget *parent) :
|
||||
//one across it, in pixels, moving the label as one thing --
|
||||
//installation, place and designation over the line, type and
|
||||
//length under it -- and the line not at all.
|
||||
addOffsetRow(grid, row + 1, tr("Position du texte"),
|
||||
tr("Décale tout le texte du câble : installation, emplacement "
|
||||
"et désignation d'un côté, type et longueur de l'autre. "
|
||||
"La ligne, les slashes et le câblage restent en place. "
|
||||
"10 px font une case de la grille."),
|
||||
addOffsetRow(grid, row + 1, tr("Text position"),
|
||||
tr("Shifts all the cable text: plant, location "
|
||||
"and designation on one side, type and length "
|
||||
"on the other. The line, the slashes and the "
|
||||
"wiring stay in place. 10 px make one grid cell."),
|
||||
&m_text_offset_x, &m_text_offset_y);
|
||||
|
||||
//And where the row of colours stands from the slashes it names.
|
||||
addOffsetRow(grid, row + 2, tr("Position des couleurs"),
|
||||
tr("Décale les couleurs des âmes par rapport à leurs slashes. "
|
||||
"Les slashes, les entrées et le câblage restent en place. "
|
||||
"10 px font une case de la grille."),
|
||||
addOffsetRow(grid, row + 2, tr("Core colors position"),
|
||||
tr("Shifts the core colors relative to their slashes. "
|
||||
"The slashes, the entries and the wiring stay in place. "
|
||||
"10 px make one grid cell."),
|
||||
&m_core_offset_x, &m_core_offset_y);
|
||||
|
||||
grid->setColumnStretch(2, 1);
|
||||
@@ -134,7 +134,7 @@ void CablePropertiesWidget::addField(QGridLayout *grid,
|
||||
{
|
||||
auto *label = new QLabel(name, this);
|
||||
auto *check = new QCheckBox(this);
|
||||
check->setToolTip(tr("À cocher pour écrire ce champ sur le plan.",
|
||||
check->setToolTip(tr("Tick to write this field on the drawing.",
|
||||
"tooltip of the tick before each field"));
|
||||
auto *field = new QLineEdit(this);
|
||||
field->setClearButtonEnabled(true);
|
||||
@@ -284,13 +284,13 @@ void CablePropertiesWidget::refreshFormatButton(const QString &key)
|
||||
button->setText(tr("%1 pt").arg(QString::number(font.pointSizeF(), 'g', 3)));
|
||||
|
||||
const QString tip = coresKey(key)
|
||||
? tr("Police, taille et style des couleurs des âmes.")
|
||||
: tr("Police, taille, style et alignement de ce texte.");
|
||||
? tr("Font, size and style of the core colors.")
|
||||
: tr("Font, size, style and alignment of this text.");
|
||||
const CableTextFormat format = m_formats.value(key);
|
||||
const bool its_own = !format.font.isEmpty() || format.alignment != 0;
|
||||
button->setToolTip(tip + QLatin1Char(' ') + (its_own
|
||||
? tr("Réglé pour ce câble.")
|
||||
: tr("Valeur définie dans les préférences.")));
|
||||
? tr("Set for this cable.")
|
||||
: tr("Value defined in the preferences.")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -110,15 +110,15 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
if (!project)
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber", "Aucun projet n'est ouvert.");
|
||||
"CableRenumber", "No project is open.");
|
||||
return result;
|
||||
}
|
||||
if (project->isReadOnly())
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"Ce projet est en lecture seule : ses câbles ne peuvent pas "
|
||||
"être renumérotés.");
|
||||
"This project is read-only: its cables cannot be "
|
||||
"renumbered.");
|
||||
return result;
|
||||
}
|
||||
//The rule may be one the numbering window is drawing right now
|
||||
@@ -136,9 +136,9 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"Aucune règle de numérotation des câbles n'est définie pour ce "
|
||||
"projet. Définissez-en une dans cette fenêtre avant de "
|
||||
"renuméroter ses câbles.");
|
||||
"No cable numbering rule is defined for this "
|
||||
"project. Define one in this window before "
|
||||
"renumbering its cables.");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -221,8 +221,8 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"Un câble n'est sur aucun folio du projet : rien n'a été "
|
||||
"changé.");
|
||||
"A cable is not on any sheet of the project: "
|
||||
"nothing was changed.");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -241,8 +241,8 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"La règle en cours ne donne aucun numéro ici : rien n'a été "
|
||||
"changé.");
|
||||
"The current rule gives no number here: "
|
||||
"nothing was changed.");
|
||||
return result;
|
||||
}
|
||||
//A rule which does not count hands out the same number
|
||||
@@ -252,9 +252,9 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"La règle en cours donne deux fois le même numéro (%1) : "
|
||||
"elle doit compter pour renuméroter un projet entier. "
|
||||
"Rien n'a été changé.")
|
||||
"The current rule gives the same number (%1) twice: "
|
||||
"it must count to renumber a whole project. "
|
||||
"Nothing was changed.")
|
||||
.arg(candidate);
|
||||
return result;
|
||||
}
|
||||
@@ -264,8 +264,8 @@ CableRenumberPlan CableRenumber::plan(QETProject *project,
|
||||
{
|
||||
result.error = QCoreApplication::translate(
|
||||
"CableRenumber",
|
||||
"Le numéro %1 est déjà porté par un câble dont le nom est "
|
||||
"laissé tel quel : rien n'a été changé.")
|
||||
"Number %1 is already used by a cable whose name "
|
||||
"is left as it is: nothing was changed.")
|
||||
.arg(candidate);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ CableTextFormatDialog::CableTextFormatDialog(const CableTextFormat &format,
|
||||
QDialog(parent),
|
||||
m_cores(cores)
|
||||
{
|
||||
setWindowTitle(cores ? tr("Couleurs des âmes")
|
||||
: tr("Format du texte"));
|
||||
setWindowTitle(cores ? tr("Core colors")
|
||||
: tr("Text format"));
|
||||
buildUi();
|
||||
|
||||
//The font this text is written with right now: the one this
|
||||
@@ -145,42 +145,42 @@ void CableTextFormatDialog::buildUi()
|
||||
|
||||
m_family = new QFontComboBox(this);
|
||||
m_family->setFontFilters(QFontComboBox::AllFonts);
|
||||
form->addRow(tr("Police :"), m_family);
|
||||
form->addRow(tr("Font:"), m_family);
|
||||
|
||||
m_size = new QDoubleSpinBox(this);
|
||||
m_size->setRange(1.0, 300.0);
|
||||
m_size->setDecimals(1);
|
||||
m_size->setSingleStep(0.5);
|
||||
m_size->setSuffix(tr(" pt"));
|
||||
form->addRow(tr("Taille :"), m_size);
|
||||
form->addRow(tr("Size:"), m_size);
|
||||
|
||||
m_style = new QComboBox(this);
|
||||
m_style->addItem(tr("Normal"));
|
||||
m_style->addItem(tr("Gras"));
|
||||
m_style->addItem(tr("Italique"));
|
||||
m_style->addItem(tr("Gras et italique"));
|
||||
form->addRow(tr("Style :"), m_style);
|
||||
m_style->addItem(tr("Bold"));
|
||||
m_style->addItem(tr("Italic"));
|
||||
m_style->addItem(tr("Bold italic"));
|
||||
form->addRow(tr("Style:"), m_style);
|
||||
|
||||
//The colours of the cores stand turned by a quarter along their
|
||||
//own line: there is nothing for them to line up with.
|
||||
if (!m_cores)
|
||||
{
|
||||
m_alignment = new QComboBox(this);
|
||||
m_alignment->addItem(tr("Aligné à droite"));
|
||||
m_alignment->addItem(tr("Centré"));
|
||||
m_alignment->addItem(tr("Aligné à gauche"));
|
||||
form->addRow(tr("Alignement :"), m_alignment);
|
||||
m_alignment->addItem(tr("Right aligned"));
|
||||
m_alignment->addItem(tr("Centred"));
|
||||
m_alignment->addItem(tr("Left aligned"));
|
||||
form->addRow(tr("Alignment:"), m_alignment);
|
||||
}
|
||||
|
||||
m_preview = new QLabel(tr("15W1 · H07V-K 3G1,5"), this);
|
||||
m_preview = new QLabel(tr("15W1 · H07V-K 3G1.5"), this);
|
||||
m_preview->setFrameStyle(QFrame::Box | QFrame::Plain);
|
||||
m_preview->setMinimumHeight(30);
|
||||
m_preview->setIndent(6);
|
||||
form->addRow(tr("Aperçu :"), m_preview);
|
||||
form->addRow(tr("Preview:"), m_preview);
|
||||
|
||||
auto *buttons = new QDialogButtonBox(
|
||||
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||
m_reset = buttons->addButton(tr("Réinitialiser"), QDialogButtonBox::ResetRole);
|
||||
m_reset = buttons->addButton(tr("Reset"), QDialogButtonBox::ResetRole);
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
connect(m_reset, &QPushButton::clicked, this, [this]() {
|
||||
|
||||
@@ -35,7 +35,7 @@ BatchCommand::BatchCommand(QUndoCommand *first, QUndoCommand *second) :
|
||||
m_steps({first, second})
|
||||
{
|
||||
m_steps.removeAll(nullptr);
|
||||
setText(QCoreApplication::translate("BatchCommand", "Supprimer"));
|
||||
setText(QCoreApplication::translate("BatchCommand", "Delete"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +113,7 @@ MoveCablePartCommand::MoveCablePartCommand(Cable *cable,
|
||||
m_before_cores(before_cores),
|
||||
m_after_cores(after_cores)
|
||||
{
|
||||
setText(QCoreApplication::translate("MoveCablePartCommand", "Déplacer un câble"));
|
||||
setText(QCoreApplication::translate("MoveCablePartCommand", "Move a cable"));
|
||||
}
|
||||
|
||||
void MoveCablePartCommand::undo()
|
||||
@@ -161,7 +161,7 @@ ChangeCablePropertiesCommand::ChangeCablePropertiesCommand(Cable *cable,
|
||||
m_after(after)
|
||||
{
|
||||
setText(QCoreApplication::translate("ChangeCablePropertiesCommand",
|
||||
"Modifier les propriétés d'un câble"));
|
||||
"Edit the properties of a cable"));
|
||||
}
|
||||
|
||||
void ChangeCablePropertiesCommand::undo()
|
||||
@@ -214,7 +214,7 @@ RenumberCablesCommand::RenumberCablesCommand(const QList<Cable *> &cables,
|
||||
}
|
||||
|
||||
setText(QCoreApplication::translate("RenumberCablesCommand",
|
||||
"Renumérotter %n câble(s)",
|
||||
"Renumber %n cable(s)",
|
||||
"", m_cables.size()));
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ ChangeCableTypeCommand::ChangeCableTypeCommand(Cable *cable,
|
||||
m_after(after)
|
||||
{
|
||||
setText(QCoreApplication::translate("ChangeCableTypeCommand",
|
||||
"Changer le type du câble"));
|
||||
"Change the cable type"));
|
||||
}
|
||||
|
||||
void ChangeCableTypeCommand::undo()
|
||||
@@ -330,7 +330,7 @@ ChangeCableCoresCommand::ChangeCableCoresCommand(Cable *cable,
|
||||
{
|
||||
setText(text.isEmpty()
|
||||
? QCoreApplication::translate("ChangeCableCoresCommand",
|
||||
"Déplacer une âme de câble")
|
||||
"Move a cable core")
|
||||
: text);
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ void ChangeCableCoresCommand::apply(const QList<CableCore> &cores)
|
||||
RemoveCableCommand::RemoveCableCommand(Diagram *diagram, const QList<CablePart *> &parts) :
|
||||
m_diagram(diagram)
|
||||
{
|
||||
setText(QCoreApplication::translate("RemoveCableCommand", "Supprimer un câble"));
|
||||
setText(QCoreApplication::translate("RemoveCableCommand", "Delete a cable"));
|
||||
|
||||
for (CablePart *part : parts)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ CableExportDialog::CableExportDialog(QETProject *project, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_project(project)
|
||||
{
|
||||
setWindowTitle(tr("Exporter la liste des câbles au format CSV"));
|
||||
setWindowTitle(tr("Export the cable list as CSV"));
|
||||
QET::trackDialogGeometry(this);
|
||||
|
||||
auto *main_layout = new QVBoxLayout(this);
|
||||
@@ -56,16 +56,16 @@ CableExportDialog::CableExportDialog(QETProject *project, QWidget *parent) :
|
||||
m_query_widget = new CableQueryWidget(this);
|
||||
main_layout->addWidget(m_query_widget);
|
||||
|
||||
auto *page_group = new QGroupBox(tr("Mise en page"), this);
|
||||
auto *page_group = new QGroupBox(tr("Layout"), this);
|
||||
auto *page_layout = new QVBoxLayout(page_group);
|
||||
m_include_headers = new QCheckBox(tr("inclure les en-têtes"), page_group);
|
||||
m_include_headers = new QCheckBox(tr("include headers"), page_group);
|
||||
m_include_headers->setChecked(true);
|
||||
page_layout->addWidget(m_include_headers);
|
||||
page_layout->addStretch();
|
||||
main_layout->addWidget(page_group);
|
||||
|
||||
auto *preview_layout = new QHBoxLayout;
|
||||
auto *preview_pb = new QPushButton(tr("Aperçu"), this);
|
||||
auto *preview_pb = new QPushButton(tr("Preview"), this);
|
||||
preview_layout->addWidget(preview_pb);
|
||||
preview_layout->addStretch();
|
||||
main_layout->addLayout(preview_layout);
|
||||
@@ -105,11 +105,11 @@ int CableExportDialog::exec()
|
||||
QString dir = m_project->currentDir();
|
||||
if (dir.isEmpty()) dir = QETApp::documentDir();
|
||||
const QString file_name = dir + QLatin1Char('/')
|
||||
+ tr("liste_cables_") + m_project->title()
|
||||
+ tr("cable_list_") + m_project->title()
|
||||
+ QStringLiteral(".csv");
|
||||
const QString file_path = QFileDialog::getSaveFileName(
|
||||
this, tr("Enregistrer sous... "), file_name,
|
||||
tr("Fichiers csv (*.csv)"));
|
||||
this, tr("Save As... "), file_name,
|
||||
tr("CSV files (*.csv)"));
|
||||
if (!file_path.isEmpty())
|
||||
{
|
||||
QString error;
|
||||
@@ -118,8 +118,8 @@ int CableExportDialog::exec()
|
||||
m_include_headers->isChecked());
|
||||
if (!BomExport::writeCsv(file_path, csv, &error)) {
|
||||
QMessageBox::critical(
|
||||
this, tr("Erreur"),
|
||||
tr("Impossible d'enregistrer la liste des câbles dans %1.\n%2")
|
||||
this, tr("Error"),
|
||||
tr("Cannot save the cable list to %1.\n%2")
|
||||
.arg(file_path, error));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ CableListModelPropertiesWidget::CableListModelPropertiesWidget(
|
||||
PropertiesEditorWidget(parent)
|
||||
{
|
||||
auto *layout = new QHBoxLayout(this);
|
||||
m_edit_pb = new QPushButton(tr("Modifier les colonnes..."), this);
|
||||
m_refresh_pb = new QPushButton(tr("Rafraîchir"), this);
|
||||
m_edit_pb = new QPushButton(tr("Edit columns..."), this);
|
||||
m_refresh_pb = new QPushButton(tr("Refresh"), this);
|
||||
layout->addWidget(m_edit_pb);
|
||||
layout->addWidget(m_refresh_pb);
|
||||
layout->addStretch();
|
||||
@@ -73,7 +73,7 @@ void CableListModelPropertiesWidget::editColumns()
|
||||
}
|
||||
|
||||
QDialog d(this);
|
||||
d.setWindowTitle(tr("Colonnes de la liste des câbles"));
|
||||
d.setWindowTitle(tr("Cable list columns"));
|
||||
auto *layout = new QVBoxLayout(&d);
|
||||
auto *widget = new CableQueryWidget(&d);
|
||||
widget->setFields(m_model->fields());
|
||||
|
||||
@@ -150,21 +150,21 @@ QString labelOfEnd(const CableEnd &end)
|
||||
const QList<CableList::Column> &CableList::allColumns()
|
||||
{
|
||||
static const QList<Column> columns = {
|
||||
{QStringLiteral("nr"), tr("N°")},
|
||||
{QStringLiteral("installation_cable"), tr("Installation câble")},
|
||||
{QStringLiteral("location_cable"), tr("Localisation câble")},
|
||||
{QStringLiteral("bmk_cable"), tr("Label câble")},
|
||||
{QStringLiteral("installation_start"), tr("Installation début")},
|
||||
{QStringLiteral("location_start"), tr("Localisation début")},
|
||||
{QStringLiteral("bmk_start"), tr("Label début")},
|
||||
{QStringLiteral("folio_start"), tr("Folio début")},
|
||||
{QStringLiteral("installation_end"), tr("Installation fin")},
|
||||
{QStringLiteral("location_end"), tr("Localisation fin")},
|
||||
{QStringLiteral("bmk_end"), tr("Label fin")},
|
||||
{QStringLiteral("folio_end"), tr("Folio fin")},
|
||||
{QStringLiteral("type"), tr("Type de câble")},
|
||||
{QStringLiteral("length"), tr("Longueur")},
|
||||
{QStringLiteral("cores_used"), tr("Âmes utilisées")},
|
||||
{QStringLiteral("nr"), tr("No.")},
|
||||
{QStringLiteral("installation_cable"), tr("Plant (cable)")},
|
||||
{QStringLiteral("location_cable"), tr("Location (cable)")},
|
||||
{QStringLiteral("bmk_cable"), tr("Label (cable)")},
|
||||
{QStringLiteral("installation_start"), tr("Plant (start)")},
|
||||
{QStringLiteral("location_start"), tr("Location (start)")},
|
||||
{QStringLiteral("bmk_start"), tr("Label (start)")},
|
||||
{QStringLiteral("folio_start"), tr("Sheet (start)")},
|
||||
{QStringLiteral("installation_end"), tr("Plant (end)")},
|
||||
{QStringLiteral("location_end"), tr("Location (end)")},
|
||||
{QStringLiteral("bmk_end"), tr("Label (end)")},
|
||||
{QStringLiteral("folio_end"), tr("Sheet (end)")},
|
||||
{QStringLiteral("type"), tr("Cable type")},
|
||||
{QStringLiteral("length"), tr("Length")},
|
||||
{QStringLiteral("cores_used"), tr("Used cores")},
|
||||
};
|
||||
return columns;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ CableQueryWidget::CableQueryWidget(QWidget *parent) :
|
||||
auto *lists = new QHBoxLayout;
|
||||
|
||||
auto *left = new QVBoxLayout;
|
||||
left->addWidget(new QLabel(tr("Colonnes disponibles"), this));
|
||||
left->addWidget(new QLabel(tr("Available columns"), this));
|
||||
m_available_list = new QListWidget(this);
|
||||
left->addWidget(m_available_list);
|
||||
|
||||
@@ -59,10 +59,10 @@ CableQueryWidget::CableQueryWidget(QWidget *parent) :
|
||||
button->setToolTip(tip);
|
||||
return button;
|
||||
};
|
||||
auto *add_pb = make_button(QStyle::SP_ArrowRight, tr("Ajouter la colonne sélectionnée"));
|
||||
auto *remove_pb = make_button(QStyle::SP_ArrowLeft, tr("Retirer la colonne sélectionnée"));
|
||||
auto *up_pb = make_button(QStyle::SP_ArrowUp, tr("Monter la colonne sélectionnée"));
|
||||
auto *down_pb = make_button(QStyle::SP_ArrowDown, tr("Descendre la colonne sélectionnée"));
|
||||
auto *add_pb = make_button(QStyle::SP_ArrowRight, tr("Add the selected column"));
|
||||
auto *remove_pb = make_button(QStyle::SP_ArrowLeft, tr("Remove the selected column"));
|
||||
auto *up_pb = make_button(QStyle::SP_ArrowUp, tr("Move the selected column up"));
|
||||
auto *down_pb = make_button(QStyle::SP_ArrowDown, tr("Move the selected column down"));
|
||||
buttons->addWidget(add_pb);
|
||||
buttons->addWidget(remove_pb);
|
||||
buttons->addWidget(up_pb);
|
||||
@@ -70,7 +70,7 @@ CableQueryWidget::CableQueryWidget(QWidget *parent) :
|
||||
buttons->addStretch();
|
||||
|
||||
auto *right = new QVBoxLayout;
|
||||
right->addWidget(new QLabel(tr("Colonnes du tableau"), this));
|
||||
right->addWidget(new QLabel(tr("Table columns"), this));
|
||||
m_choosen_list = new QListWidget(this);
|
||||
right->addWidget(m_choosen_list);
|
||||
|
||||
|
||||
@@ -265,20 +265,20 @@ QString CableTypeList::translatedColumn(const QString &column)
|
||||
//The columns which are specific to a cable keep their own wording,
|
||||
//the ones shared with the material file reuse the element
|
||||
//information wording, so both catalogues read the same. The type
|
||||
//column is the exception: it is called Désignation here, the way
|
||||
//the cable form calls it, and not "Numéro d'article", which is
|
||||
//column is the exception: it is called Designation here, the way
|
||||
//the cable form calls it, and not "Article number", which is
|
||||
//what an element means by it.
|
||||
static const QMap<QString, QString> own = {
|
||||
{QStringLiteral("designation"),
|
||||
QCoreApplication::translate("CableTypeList", "Désignation")},
|
||||
QCoreApplication::translate("CableTypeList", "Designation")},
|
||||
{QStringLiteral("cores"),
|
||||
QCoreApplication::translate("CableTypeList", "Nombre d'âmes")},
|
||||
QCoreApplication::translate("CableTypeList", "Number of cores")},
|
||||
{QStringLiteral("core_colors"),
|
||||
QCoreApplication::translate("CableTypeList", "Couleurs des âmes")},
|
||||
QCoreApplication::translate("CableTypeList", "Core colors")},
|
||||
{QStringLiteral("section"),
|
||||
QCoreApplication::translate("CableTypeList", "Section du câble")},
|
||||
QCoreApplication::translate("CableTypeList", "Cable section")},
|
||||
{QStringLiteral("color"),
|
||||
QCoreApplication::translate("CableTypeList", "Couleur du fourreau")}
|
||||
QCoreApplication::translate("CableTypeList", "Sheath color")}
|
||||
};
|
||||
|
||||
const auto it = own.constFind(column);
|
||||
@@ -386,7 +386,7 @@ QMap<QString, QString> CableTypeList::headerAliasMap()
|
||||
map.insert(translated.toLower(), key);
|
||||
}
|
||||
//The element information spells the same column another way
|
||||
//("Numéro d'article" for designation); both are accepted, so
|
||||
//("Article number" for designation); both are accepted, so
|
||||
//that a file written with either wording reads the same.
|
||||
const QString info_key = QETInformation::translatedInfoKey(key);
|
||||
if (!info_key.isEmpty() && info_key != translated) {
|
||||
@@ -409,6 +409,24 @@ QMap<QString, QString> CableTypeList::headerAliasMap()
|
||||
}
|
||||
}
|
||||
|
||||
//The wording older files were written with : these French names
|
||||
//were the ones the label line carried before the interface text
|
||||
//became English, and a catalogue written with them must keep
|
||||
//reading, so each of them still means its column here.
|
||||
static const QMap<QString, QString> older_wording = {
|
||||
{QStringLiteral("désignation"), QStringLiteral("designation")},
|
||||
{QStringLiteral("nombre d'âmes"), QStringLiteral("cores")},
|
||||
{QStringLiteral("couleurs des âmes"), QStringLiteral("core_colors")},
|
||||
{QStringLiteral("section du câble"), QStringLiteral("section")},
|
||||
{QStringLiteral("couleur du fourreau"), QStringLiteral("color")}
|
||||
};
|
||||
for (auto it = older_wording.constBegin(); it != older_wording.constEnd(); ++it)
|
||||
{
|
||||
if (!map.contains(it.key())) {
|
||||
map.insert(it.key(), it.value());
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -517,7 +535,7 @@ bool CableTypeList::load(const QString &path, CableTypeListData *data, QString *
|
||||
}
|
||||
if (!data) {
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("CableTypeList", "Aucun récepteur pour le fichier des types de câbles.");
|
||||
*error = QCoreApplication::translate("CableTypeList", "No receiver for the cable types file.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -695,7 +713,7 @@ bool CableTypeList::appendRecord(const QString &path, const CableTypeRecord &rec
|
||||
if (data.columns.isEmpty())
|
||||
{
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("CableTypeList", "Le fichier ne contient pas d'en-tête : colonnes manquantes.");
|
||||
*error = QCoreApplication::translate("CableTypeList", "The file contains no header: missing columns.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -740,7 +758,7 @@ bool CableTypeList::updateRecord(const QString &path,
|
||||
if (data.columns.isEmpty())
|
||||
{
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("CableTypeList", "Le fichier ne contient pas d'en-tête : colonnes manquantes.");
|
||||
*error = QCoreApplication::translate("CableTypeList", "The file contains no header: missing columns.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -759,7 +777,7 @@ bool CableTypeList::updateRecord(const QString &path,
|
||||
//there now would overwrite somebody else's work.
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("CableTypeList",
|
||||
"Cette entrée n'existe plus dans le fichier : elle a peut-être été modifiée entre-temps.");
|
||||
"This entry no longer exists in the file: it may have been modified in the meantime.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -784,7 +802,7 @@ bool CableTypeList::createFile(const QString &path, QString *error)
|
||||
if (hasContent(path))
|
||||
{
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("CableTypeList", "Le fichier existe déjà et n'est pas vide.");
|
||||
*error = QCoreApplication::translate("CableTypeList", "The file already exists and is not empty.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -158,16 +158,16 @@ void DiagramEventAddCable::updateHint() const
|
||||
if (!m_has_anchor)
|
||||
{
|
||||
editor->statusBar()->showMessage(tr(
|
||||
"Clic gauche : poser le départ du câble ; "
|
||||
"glisser ou second clic : terminer ; "
|
||||
"clic droit : annuler ; Échap : quitter"));
|
||||
"Left click: place the cable start; "
|
||||
"drag or second click: finish; "
|
||||
"right click: cancel; Esc: quit"));
|
||||
return;
|
||||
}
|
||||
|
||||
editor->statusBar()->showMessage(tr(
|
||||
"Clic gauche ou relâcher : terminer la ligne "
|
||||
"(%n âme(s) reconnue(s) ; toujours horizontale ou verticale) ; "
|
||||
"clic droit : annuler la ligne",
|
||||
"Left click or release: finish the line "
|
||||
"(%n core(s) recognized; always horizontal or vertical); "
|
||||
"right click: cancel the line",
|
||||
"how many conductors the line being drawn already crosses",
|
||||
m_crossings.size()));
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ void DiagramEventAddPaste::commit()
|
||||
|
||||
auto *added = new AddCableCommand(line.part->cable(), line.part.data(),
|
||||
m_diagram, true, line.taken);
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Coller un câble"));
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Paste a cable"));
|
||||
cable_commands << added;
|
||||
}
|
||||
|
||||
|
||||
@@ -748,7 +748,7 @@ void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) {
|
||||
if (!line.part) continue;
|
||||
auto *added = new AddCableCommand(line.part->cable(), line.part.data(),
|
||||
m_diagram, true, line.taken);
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Coller un câble"));
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Paste a cable"));
|
||||
cable_commands << added;
|
||||
}
|
||||
//The copies end up selected, like everything else a paste
|
||||
@@ -872,7 +872,7 @@ void DiagramView::duplicate(const QPoint &stepOffset)
|
||||
if (!line.part) continue;
|
||||
auto *added = new AddCableCommand(line.part->cable(), line.part.data(),
|
||||
m_diagram, true, line.taken);
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Dupliquer un câble"));
|
||||
added->setText(QCoreApplication::translate("CableCopy", "Duplicate a cable"));
|
||||
command = batchWith(command, added);
|
||||
}
|
||||
for (const CableCopy::Wired &line : std::as_const(wired)) {
|
||||
@@ -2194,7 +2194,7 @@ bool DiagramView::cableCoreMenu(const QPoint &menu_pos, const QPoint &global_pos
|
||||
}
|
||||
|
||||
QMenu menu(this);
|
||||
QAction *take = menu.addAction(tr("Retirer cette âme de la ligne"));
|
||||
QAction *take = menu.addAction(tr("Remove this core from the line"));
|
||||
take->setIcon(QET::Icons::Cable);
|
||||
|
||||
if (menu.exec(global_pos) == take) {
|
||||
|
||||
@@ -85,8 +85,8 @@ void QetGraphicsTableFactory::createAndAddCableList(Diagram *diagram)
|
||||
new AddTableDialog(
|
||||
new CableQueryWidget(),
|
||||
diagram->views().first()));
|
||||
d->setWindowTitle(QObject::tr("Ajouter une liste de câbles"));
|
||||
d->setTableName(QObject::tr("Liste des câbles"));
|
||||
d->setWindowTitle(QObject::tr("Add a cable list"));
|
||||
d->setTableName(QObject::tr("Cable list"));
|
||||
|
||||
if (d->exec()) {
|
||||
create(diagram, d.data());
|
||||
|
||||
@@ -751,7 +751,7 @@ void QETDiagramEditor::setUpActions()
|
||||
connect(m_project_terminalBloc, &QAction::triggered, this, &QETDiagramEditor::generateTerminalBlock);
|
||||
|
||||
//Add a cable list
|
||||
m_add_cable_list = new QAction(QET::Icons::TableOfContent, tr("Ajouter une liste de câbles"), this);
|
||||
m_add_cable_list = new QAction(QET::Icons::TableOfContent, tr("Add a cable list"), this);
|
||||
connect(m_add_cable_list, &QAction::triggered, this, [this]() {
|
||||
if (this->currentDiagramView()) {
|
||||
QetGraphicsTableFactory::createAndAddCableList(this->currentDiagramView()->diagram());
|
||||
@@ -759,7 +759,7 @@ void QETDiagramEditor::setUpActions()
|
||||
});
|
||||
|
||||
//Export the whole cable list to CSV, every column of the list
|
||||
m_export_cable_list = new QAction(QET::Icons::DocumentSpreadsheet, tr("Exporter la liste des câbles au format CSV"), this);
|
||||
m_export_cable_list = new QAction(QET::Icons::DocumentSpreadsheet, tr("Export the cable list to CSV format"), this);
|
||||
connect(m_export_cable_list, &QAction::triggered, [this]() {
|
||||
QETProject *project = this->currentProject();
|
||||
if (!project) {
|
||||
@@ -813,10 +813,10 @@ void QETDiagramEditor::setUpActions()
|
||||
|
||||
// Cable numbering: the rule the project numbers its cables with, and
|
||||
// the numbering of every cable of that project at once
|
||||
m_cable_numbering = new QAction(QET::Icons::AutoNum, tr("Numérotation des câbles"), this);
|
||||
m_cable_numbering = new QAction(QET::Icons::AutoNum, tr("Cable numbering"), this);
|
||||
m_cable_numbering->setStatusTip(
|
||||
tr("Affiche la règle de numérotation des câbles du projet et "
|
||||
"renumérote ses câbles d'après elle"));
|
||||
tr("Shows the cable numbering rule of the project and "
|
||||
"renumbers its cables with it"));
|
||||
connect(m_cable_numbering, &QAction::triggered, this, &QETDiagramEditor::slot_cableNumbering);
|
||||
|
||||
// Reload element drawings from their current definition (bugtracker #802)
|
||||
@@ -1280,7 +1280,7 @@ void QETDiagramEditor::setUpActions()
|
||||
QAction *add_generic_device = m_add_item_actions_group.addAction(QET::Icons::GenericDevice, tr("Add a generic device…"));
|
||||
//Not an element of the drawing but a line drawn across the
|
||||
//conductors: what it crosses becomes the cores of a cable.
|
||||
m_add_cable = m_add_item_actions_group.addAction(QET::Icons::Cable, tr("Tracer un câble"));
|
||||
m_add_cable = m_add_item_actions_group.addAction(QET::Icons::Cable, tr("Draw a cable"));
|
||||
|
||||
add_text ->setStatusTip(tr("Adds a text field to the current sheet"));
|
||||
add_image ->setStatusTip(tr("Add an image to the current sheet"));
|
||||
@@ -1296,7 +1296,7 @@ void QETDiagramEditor::setUpActions()
|
||||
add_fillet ->setStatusTip(tr("Rounds the corner between two lines of the current sheet"));
|
||||
add_terminal_strip->setStatusTip(tr("Adds a terminal plan to the current sheet"));
|
||||
add_generic_device->setStatusTip(tr("Makes a box symbol with terminals on any side and places it on the current sheet"));
|
||||
m_add_cable ->setStatusTip(tr("Trace la ligne maîtresse d'un câble : chaque conducteur traversé devient une de ses âmes"));
|
||||
m_add_cable ->setStatusTip(tr("Draws the main line of a cable: every conductor crossed becomes one of its cores"));
|
||||
|
||||
add_text ->setData(QStringLiteral("text"));
|
||||
add_image ->setData(QStringLiteral("image"));
|
||||
@@ -1485,8 +1485,8 @@ void QETDiagramEditor::setUpMenu()
|
||||
QMenu* menu_project = new QMenu(tr("&Project"), this);
|
||||
//Numbering of everything the project numbers, kept together
|
||||
//and sitting right behind the project it belongs to
|
||||
QMenu* menu_numbering = new QMenu(tr("Numérotation"), this);
|
||||
QMenu* menu_lists = new QMenu(tr("Listes"), this);
|
||||
QMenu* menu_numbering = new QMenu(tr("Numbering"), this);
|
||||
QMenu* menu_lists = new QMenu(tr("Lists"), this);
|
||||
QMenu* menu_affichage = new QMenu(tr("Displ&ay"), this);
|
||||
// QMenu *menu_outils = new QMenu(tr("O&utils"), this);
|
||||
windows_menu = new QMenu(tr("Wi&ndows"), this);
|
||||
@@ -1621,7 +1621,7 @@ void QETDiagramEditor::setUpMenu()
|
||||
menu_project -> addAction(m_export_project_db);
|
||||
#endif
|
||||
|
||||
// menu Numérotation
|
||||
// menu Numbering
|
||||
//Everything the project numbers sits here together: the
|
||||
//terminals have come out of the project menu, the cables are
|
||||
//the new one
|
||||
@@ -2350,20 +2350,20 @@ bool QETDiagramEditor::cableNumberingGate(Diagram *diagram)
|
||||
}
|
||||
|
||||
QMessageBox box(QMessageBox::Question,
|
||||
tr("Numérotation automatique", "window title"),
|
||||
tr("Aucune numérotation automatique des câbles n'est définie.",
|
||||
tr("Automatic numbering", "window title"),
|
||||
tr("No automatic cable numbering is defined.",
|
||||
"shown when a project has no cable numbering rule"),
|
||||
QMessageBox::NoButton,
|
||||
this);
|
||||
box.setInformativeText(tr(
|
||||
"Voulez-vous en définir une maintenant ?\n\n"
|
||||
"Vous pourrez aussi numéroter les câbles automatiquement plus "
|
||||
"tard : cette règle se règle à tout moment dans les propriétés "
|
||||
"du projet, page « Numérotation auto ».",
|
||||
"Do you want to define one now?\n\n"
|
||||
"You can also number the cables automatically later: the rule "
|
||||
"is set at any time in the project properties, on the "
|
||||
"\"Auto Numbering\" page.",
|
||||
"ask whether a cable numbering rule should be defined now"));
|
||||
QPushButton *define_button = box.addButton(tr("Oui", "yes"), QMessageBox::YesRole);
|
||||
QPushButton *later_button = box.addButton(tr("Non", "no"), QMessageBox::NoRole);
|
||||
box.addButton(tr("Annuler", "cancel"), QMessageBox::RejectRole);
|
||||
QPushButton *define_button = box.addButton(tr("Yes", "yes"), QMessageBox::YesRole);
|
||||
QPushButton *later_button = box.addButton(tr("No", "no"), QMessageBox::NoRole);
|
||||
box.addButton(tr("Cancel", "cancel"), QMessageBox::RejectRole);
|
||||
box.setDefaultButton(later_button);
|
||||
box.exec();
|
||||
|
||||
@@ -2974,7 +2974,7 @@ void QETDiagramEditor::slot_updateComplexActions()
|
||||
//edit cable
|
||||
else if (selected_cables)
|
||||
{
|
||||
m_edit_selection -> setText(tr("Éditer le câble",
|
||||
m_edit_selection -> setText(tr("Edit the cable",
|
||||
"edit cable"));
|
||||
m_edit_selection -> setIcon(QET::Icons::Cable);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ CableNumberingDialog::CableNumberingDialog(QETProject *project, QWidget *parent)
|
||||
QDialog(parent),
|
||||
m_project(project)
|
||||
{
|
||||
setWindowTitle(tr("Numérotation des câbles"));
|
||||
setWindowTitle(tr("Cable numbering"));
|
||||
//The rule editor needs room to be read: this window opens with
|
||||
//the size it needs rather than with whatever its contents
|
||||
//happen to add up to, so nothing of the rule is cramped from
|
||||
@@ -55,10 +55,10 @@ CableNumberingDialog::CableNumberingDialog(QETProject *project, QWidget *parent)
|
||||
auto *layout = new QVBoxLayout(this);
|
||||
|
||||
auto *note = new QLabel(tr(
|
||||
"Cette fenêtre montre la règle de numérotation automatique des "
|
||||
"câbles de ce projet et la modifie. Une règle changée ici est "
|
||||
"celle que le projet garde : elle est écrite dans le projet quand "
|
||||
"vous validez."), this);
|
||||
"This window shows the automatic numbering rule for the cables "
|
||||
"of this project and edits it. A rule changed here is the one "
|
||||
"the project keeps: it is written into the project when you "
|
||||
"apply it."), this);
|
||||
note->setWordWrap(true);
|
||||
layout->addWidget(note);
|
||||
|
||||
@@ -68,27 +68,27 @@ CableNumberingDialog::CableNumberingDialog(QETProject *project, QWidget *parent)
|
||||
m_rule->setSingleRuleMode(true);
|
||||
layout->addWidget(m_rule);
|
||||
|
||||
auto *axis_group = new QGroupBox(tr("Priorité des axes"), this);
|
||||
auto *axis_group = new QGroupBox(tr("Axis priority"), this);
|
||||
auto *axis_layout = new QHBoxLayout(axis_group);
|
||||
m_axis_x = new QRadioButton(tr("Priorité à l'axe X (horizontal)"), axis_group);
|
||||
m_axis_y = new QRadioButton(tr("Priorité à l'axe Y (vertical)"), axis_group);
|
||||
m_axis_x = new QRadioButton(tr("Priority to the X axis (horizontal)"), axis_group);
|
||||
m_axis_y = new QRadioButton(tr("Priority to the Y axis (vertical)"), axis_group);
|
||||
axis_layout->addWidget(m_axis_x);
|
||||
axis_layout->addWidget(m_axis_y);
|
||||
layout->addWidget(axis_group);
|
||||
|
||||
auto *axis_note = new QLabel(tr(
|
||||
"L'axe choisi décide l'ordre dans lequel les câbles sont "
|
||||
"renumérotés : X les numérote de gauche à droite, Y les numérote "
|
||||
"de haut en bas."), this);
|
||||
"The chosen axis decides the order in which the cables are "
|
||||
"renumbered: X numbers them from left to right, Y numbers them "
|
||||
"from top to bottom."), this);
|
||||
axis_note->setWordWrap(true);
|
||||
layout->addWidget(axis_note);
|
||||
|
||||
auto *actions = new QHBoxLayout();
|
||||
m_renumber_pb = new QPushButton(tr("Renumérotter tous les câbles"), this);
|
||||
m_renumber_pb = new QPushButton(tr("Renumber all cables"), this);
|
||||
m_renumber_pb->setToolTip(tr(
|
||||
"Remet le numéro de chaque câble du projet d'après la règle, en "
|
||||
"partant du début : un numéro manquant après la suppression d'un "
|
||||
"câble se referme ainsi."));
|
||||
"Sets the number of each cable of the project again from the "
|
||||
"rule, starting at the beginning: a number left missing after "
|
||||
"a cable is deleted is filled in this way."));
|
||||
actions->addWidget(m_renumber_pb);
|
||||
actions->addStretch();
|
||||
|
||||
@@ -100,7 +100,7 @@ CableNumberingDialog::CableNumberingDialog(QETProject *project, QWidget *parent)
|
||||
//thing twice.
|
||||
m_box = new QDialogButtonBox(this);
|
||||
m_box->addButton(QDialogButtonBox::Cancel);
|
||||
m_box->button(QDialogButtonBox::Cancel)->setText(tr("Annuler"));
|
||||
m_box->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
|
||||
actions->addWidget(m_box);
|
||||
layout->addLayout(actions);
|
||||
|
||||
@@ -170,9 +170,9 @@ bool CableNumberingDialog::save()
|
||||
{
|
||||
if (!m_rule->isValid())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Numérotation des câbles"),
|
||||
tr("La règle n'est pas encore complète : "
|
||||
"il reste un champ vide dedans."));
|
||||
QMessageBox::warning(this, tr("Cable numbering"),
|
||||
tr("The rule is not complete yet: "
|
||||
"there is still an empty field in it."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -260,19 +260,19 @@ int CableNumberingDialog::askAboutHandWritten(int count)
|
||||
{
|
||||
if (count <= 0) return 1;
|
||||
|
||||
QMessageBox box(QMessageBox::Question, tr("Numérotation des câbles"),
|
||||
tr("%n nom(s) de câble(s) de ce projet ont été saisis à "
|
||||
"la main.\n\n"
|
||||
"Les renuméroter aussi ?", "", count),
|
||||
QMessageBox box(QMessageBox::Question, tr("Cable numbering"),
|
||||
tr("%n cable(s) of this project were entered by "
|
||||
"hand.\n\n"
|
||||
"Do you want to renumber them too?", "", count),
|
||||
QMessageBox::NoButton, this);
|
||||
QPushButton *take = box.addButton(
|
||||
tr("Oui", "Les noms saisis à la main sont remplacés eux aussi."),
|
||||
tr("Yes", "Les noms saisis à la main sont remplacés eux aussi."),
|
||||
QMessageBox::YesRole);
|
||||
QPushButton *leave = box.addButton(
|
||||
tr("Non", "Les noms saisis à la main sont laissés tels quels."),
|
||||
tr("No", "Les noms saisis à la main sont laissés tels quels."),
|
||||
QMessageBox::NoRole);
|
||||
QPushButton *cancel = box.addButton(
|
||||
tr("Annuler", "Ne renumérote rien du tout."),
|
||||
tr("Cancel", "Ne renumérote rien du tout."),
|
||||
QMessageBox::RejectRole);
|
||||
//Keeping his own names is the safe answer under his finger
|
||||
box.setDefaultButton(leave);
|
||||
@@ -305,8 +305,8 @@ void CableNumberingDialog::renumber()
|
||||
const NumerotationContext rule = m_rule->toNumContext();
|
||||
if (!m_rule->isValid() || rule.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Numérotation des câbles"),
|
||||
tr("La règle n'est pas encore complète."));
|
||||
QMessageBox::warning(this, tr("Cable numbering"),
|
||||
tr("The rule is not complete yet."));
|
||||
return;
|
||||
}
|
||||
const bool axis_first = m_axis_x->isChecked();
|
||||
@@ -318,7 +318,7 @@ void CableNumberingDialog::renumber()
|
||||
true);
|
||||
if (!plan.ok())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Numérotation des câbles"), plan.error);
|
||||
QMessageBox::warning(this, tr("Cable numbering"), plan.error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -333,14 +333,14 @@ void CableNumberingDialog::renumber()
|
||||
plan = CableRenumber::plan(m_project, rule, axis_first, false);
|
||||
if (!plan.ok())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Numérotation des câbles"), plan.error);
|
||||
QMessageBox::warning(this, tr("Cable numbering"), plan.error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (plan.cables.isEmpty())
|
||||
{
|
||||
QMessageBox::information(this, tr("Numérotation des câbles"),
|
||||
tr("Aucun câble à renuméroter dans ce projet."));
|
||||
QMessageBox::information(this, tr("Cable numbering"),
|
||||
tr("No cable to renumber in this project."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -358,9 +358,9 @@ void CableNumberingDialog::renumber()
|
||||
}
|
||||
if (!changed)
|
||||
{
|
||||
QMessageBox::information(this, tr("Numérotation des câbles"),
|
||||
tr("Tous les câbles portent déjà le numéro "
|
||||
"que la règle leur donne."));
|
||||
QMessageBox::information(this, tr("Cable numbering"),
|
||||
tr("All the cables already carry the number "
|
||||
"that the rule gives them."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class QRadioButton;
|
||||
class SelectAutonumW;
|
||||
|
||||
/**
|
||||
@brief The window behind the "Numérotation des câbles" entry of the
|
||||
@brief The window behind the "Cable numbering" entry of the
|
||||
numbering menu: the one numbering rule the project numbers its
|
||||
cables with, the axis those cables are laid out along when the whole
|
||||
project is numbered again, and the button which does that numbering.
|
||||
|
||||
@@ -176,7 +176,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project,
|
||||
autonum_inner_tab->addTab(m_autonum_conductor.widget, tr("Conductors"));
|
||||
autonum_inner_tab->addTab(m_autonum_element.widget, tr("Elements"));
|
||||
autonum_inner_tab->addTab(m_autonum_folio.widget, tr("Sheets"));
|
||||
autonum_inner_tab->addTab(m_autonum_cable.widget, tr("Câbles"));
|
||||
autonum_inner_tab->addTab(m_autonum_cable.widget, tr("Cables"));
|
||||
autonum_layout->addWidget(autonum_inner_tab);
|
||||
tab_widget -> addTab (autonum_widget, tr("Auto Numbering"));
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ namespace {
|
||||
if (font.bold()) {
|
||||
style = font.italic()
|
||||
? QCoreApplication::translate("GeneralConfigurationPage",
|
||||
"Gras et italique")
|
||||
: QCoreApplication::translate("GeneralConfigurationPage", "Gras");
|
||||
"Bold italic")
|
||||
: QCoreApplication::translate("GeneralConfigurationPage", "Bold");
|
||||
} else if (font.italic()) {
|
||||
style = QCoreApplication::translate("GeneralConfigurationPage", "Italique");
|
||||
style = QCoreApplication::translate("GeneralConfigurationPage", "Italic");
|
||||
} else if (style.isEmpty()) {
|
||||
style = QCoreApplication::translate("GeneralConfigurationPage", "Normal");
|
||||
}
|
||||
@@ -319,7 +319,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
||||
if (path.isEmpty())
|
||||
{
|
||||
ui->m_cable_type_list_path_le->setPlaceholderText(
|
||||
tr("Non configuré (par défaut : %1)",
|
||||
tr("Not set (default: %1)",
|
||||
"hint shown in the cable type file field when no file is configured yet")
|
||||
.arg(CableTypeList::defaultPath()));
|
||||
}
|
||||
@@ -691,7 +691,7 @@ void GeneralConfigurationPage::on_m_cable_text_font_pb_clicked()
|
||||
{
|
||||
bool ok = false;
|
||||
const QFont font = QFontDialog::getFont(&ok, QETApp::cableTextsFont(), this,
|
||||
tr("Police des textes de câble"));
|
||||
tr("Cable text font"));
|
||||
if (!ok) return;
|
||||
|
||||
QSettings settings;
|
||||
@@ -709,7 +709,7 @@ void GeneralConfigurationPage::on_m_cable_core_font_pb_clicked()
|
||||
{
|
||||
bool ok = false;
|
||||
const QFont font = QFontDialog::getFont(&ok, QETApp::cableCoreFont(), this,
|
||||
tr("Police des couleurs des âmes"));
|
||||
tr("Core colors font"));
|
||||
if (!ok) return;
|
||||
|
||||
QSettings settings;
|
||||
@@ -967,9 +967,9 @@ void GeneralConfigurationPage::on_m_cable_type_list_browse_pb_clicked()
|
||||
|
||||
const QString path = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Sélectionner le fichier de la liste des types de câbles"),
|
||||
tr("Select the cable types file"),
|
||||
start_dir,
|
||||
tr("Fichiers csv (*.csv)"));
|
||||
tr("CSV files (*.csv)"));
|
||||
|
||||
if (!path.isEmpty()) {
|
||||
ui->m_cable_type_list_path_le->setText(path);
|
||||
@@ -990,9 +990,9 @@ void GeneralConfigurationPage::on_m_cable_type_list_create_pb_clicked()
|
||||
|
||||
path = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Créer le fichier de la liste des types de câbles"),
|
||||
tr("Create the cable types file"),
|
||||
path,
|
||||
tr("Fichiers csv (*.csv)"));
|
||||
tr("CSV files (*.csv)"));
|
||||
if (path.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -1008,8 +1008,8 @@ void GeneralConfigurationPage::on_m_cable_type_list_create_pb_clicked()
|
||||
if (!CableTypeList::createFile(path, &error))
|
||||
{
|
||||
QET::QetMessageBox::critical(this,
|
||||
tr("Création impossible"),
|
||||
tr("Impossible de créer le fichier :\n%1\n%2")
|
||||
tr("Cannot be created"),
|
||||
tr("Cannot create the file:\n%1\n%2")
|
||||
.arg(path, error));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="m_cable_type_list_label">
|
||||
<property name="text">
|
||||
<string>Fichier de la liste des types de câbles</string>
|
||||
<string>Cable type list file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -612,30 +612,30 @@
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_cable_type_list_path_le">
|
||||
<property name="toolTip">
|
||||
<string extracomment="tooltip of the cable type file path field">Répertoire des types de câbles utilisé pour définir un câble (nombre d'âmes, couleurs, section)</string>
|
||||
<string extracomment="tooltip of the cable type file path field">Directory of the cable types used to define a cable (number of cores, colors, cross-section)</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string extracomment="hint shown when no cable type file is configured yet">Non configuré</string>
|
||||
<string extracomment="hint shown when no cable type file is configured yet">Not set</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_cable_type_list_browse_pb">
|
||||
<property name="text">
|
||||
<string>Parcourir...</string>
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_cable_type_list_create_pb">
|
||||
<property name="toolTip">
|
||||
<string extracomment="tooltip of the button creating the cable type file with its header line">Créer le fichier de la liste des types de câbles avec ses en-têtes</string>
|
||||
<string extracomment="tooltip of the button creating the cable type file with its header line">Create the cable type list file with its header line</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Créer...</string>
|
||||
<string>Create...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -908,13 +908,13 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_cable_textes">
|
||||
<property name="title">
|
||||
<string>Textes de câble</string>
|
||||
<string>Cable texts</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_cable_textes">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_cable_textes">
|
||||
<property name="text">
|
||||
<string>Désignation, type, installation, emplacement, longueur :</string>
|
||||
<string>Designation, type, plant, location, length :</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -937,7 +937,7 @@
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="m_cable_text_font_pb">
|
||||
<property name="toolTip">
|
||||
<string>Police des textes écrits le long de la ligne d'un câble. Un câble réglé sur mesure garde la sienne.</string>
|
||||
<string>Font of the texts written along the cable line; a cable which has its own keeps it.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -947,7 +947,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_cable_core_textes">
|
||||
<property name="text">
|
||||
<string>Couleurs des âmes (toutes ensemble) :</string>
|
||||
<string>Core colors (all of them) :</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -970,7 +970,7 @@
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="m_cable_core_font_pb">
|
||||
<property name="toolTip">
|
||||
<string>Police des couleurs des âmes d'un câble, écrites le long de la ligne. Un câble réglé sur mesure garde la sienne.</string>
|
||||
<string>Font of the core colors written along the line; a cable which has its own keeps it.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -980,7 +980,7 @@
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_cable_align">
|
||||
<property name="text">
|
||||
<string>Alignement des textes :</string>
|
||||
<string>Text alignment :</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -990,21 +990,21 @@
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="m_cable_align_cb">
|
||||
<property name="toolTip">
|
||||
<string>Où les textes d'un câble s'arrêtent par rapport au début de sa ligne. Un câble réglé sur mesure garde le sien.</string>
|
||||
<string>Where the texts of a cable stop relative to the start of its line; a cable which has its own keeps it.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Aligné à droite</string>
|
||||
<string>Right aligned</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Centré</string>
|
||||
<string>Centred</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Aligné à gauche</string>
|
||||
<string>Left aligned</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
||||
@@ -571,7 +571,7 @@ void ProjectAutoNumConfigPage::initWidgets()
|
||||
//numberings stays hidden and there is nothing to choose between.
|
||||
m_saw_cable = new SelectAutonumW(3);
|
||||
m_saw_cable->setSingleRuleMode(true);
|
||||
tab_widget->addTab(m_saw_cable, tr("Câbles"));
|
||||
tab_widget->addTab(m_saw_cable, tr("Cables"));
|
||||
|
||||
//AutoNumbering Tab
|
||||
m_faw = new FolioAutonumberingW(project());
|
||||
@@ -1772,6 +1772,6 @@ void ProjectAutoNumConfigPage::changeToTab(int i)
|
||||
*/
|
||||
void ProjectAutoNumConfigPage::changeToCableTab()
|
||||
{
|
||||
//Tabs in order : Management, Conducteurs, Eléments, Folios, Câbles
|
||||
//Tabs in order : Management, Conductors, Elements, Folios, Cables
|
||||
changeToTab(4);
|
||||
}
|
||||
|
||||
@@ -133,13 +133,16 @@ void XRefPropertiesWidget::setReadOnly(bool ro) {
|
||||
*/
|
||||
void XRefPropertiesWidget::buildUi()
|
||||
{
|
||||
//Wording of the master label as the .ui wrote it, kept to put it
|
||||
//back for every type which does not rename it.
|
||||
m_master_label_text = ui->label_6->text();
|
||||
ui -> m_type_cb -> addItem(tr("Coil"), "coil");
|
||||
ui -> m_type_cb -> addItem(tr("Organ of protection"), "protection");
|
||||
ui -> m_type_cb -> addItem(tr("Switch / button"), "commutator");
|
||||
ui -> m_type_cb -> addItem(tr("Programmable Logic Controller (PLC)"), "plc");
|
||||
//Not an element: the type of the cross references a cable writes
|
||||
//in its own label when it runs on several folios.
|
||||
ui -> m_type_cb -> addItem(tr("Câble"), "cable");
|
||||
ui -> m_type_cb -> addItem(tr("Cable"), "cable");
|
||||
|
||||
ui -> m_snap_to_cb -> addItem(tr("Footer"), "bottom");
|
||||
ui -> m_snap_to_cb -> addItem(tr("Under the label of the element"), "label");
|
||||
@@ -288,7 +291,9 @@ void XRefPropertiesWidget::updateDisplay()
|
||||
ui->m_display_gb->setVisible(!is_cable);
|
||||
ui->label_7->setVisible(!is_cable);
|
||||
ui->m_slave_le->setVisible(!is_cable);
|
||||
ui->label_6->setText(is_cable ? tr("Texte :") : tr("Maitre"));
|
||||
//The wording of every type which is not a cable comes back from
|
||||
//the .ui, so the label cannot drift away from the designer one.
|
||||
ui->label_6->setText(is_cable ? tr("Text:") : m_master_label_text);
|
||||
|
||||
//Only a cable writes its reference into its own label, so only a
|
||||
//cable has a text whose font to choose here: the cross references
|
||||
@@ -296,13 +301,13 @@ void XRefPropertiesWidget::updateDisplay()
|
||||
ui->m_font_pb->setVisible(is_cable);
|
||||
if (m_current_font.isEmpty())
|
||||
{
|
||||
ui->m_font_pb->setToolTip(tr("Police et taille : celles des textes de câble"));
|
||||
ui->m_font_pb->setToolTip(tr("Font and size: those of the cable texts"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QFont font;
|
||||
if (QETUtils::fontFromString(font, m_current_font)) {
|
||||
ui->m_font_pb->setToolTip(tr("Police et taille : %1, %2 pt")
|
||||
ui->m_font_pb->setToolTip(tr("Font and size: %1, %2 pt")
|
||||
.arg(font.family()).arg(font.pointSizeF()));
|
||||
}
|
||||
}
|
||||
@@ -361,10 +366,10 @@ void XRefPropertiesWidget::chooseXRefFont()
|
||||
|
||||
bool ok = false;
|
||||
const QFont font = QFontDialog::getFont(&ok, initial, this,
|
||||
tr("Police du texte de querverweis"));
|
||||
tr("Font of the cross-reference text"));
|
||||
if (!ok) return;
|
||||
|
||||
m_current_font = QETUtils::fontToString(font);
|
||||
ui->m_font_pb->setToolTip(tr("Police et taille : %1, %2 pt")
|
||||
ui->m_font_pb->setToolTip(tr("Font and size: %1, %2 pt")
|
||||
.arg(font.family()).arg(font.pointSizeF()));
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ class XRefPropertiesWidget : public QWidget
|
||||
int m_previous_type_index;
|
||||
///The font picked for the type shown, as the settings describe it
|
||||
QString m_current_font;
|
||||
///Wording of the master label, as the .ui gives it
|
||||
QString m_master_label_text;
|
||||
};
|
||||
|
||||
#endif // XREFPROPERTIESWIDGET_H
|
||||
|
||||
@@ -234,10 +234,10 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_font_pb">
|
||||
<property name="toolTip">
|
||||
<string>Choisir la police et la taille du texte du querverweis du câble</string>
|
||||
<string>Choose the font and size of the cable cross-reference text</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Police…</string>
|
||||
<string>Font…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -117,9 +117,9 @@ class tst_cabletypelist : public QObject
|
||||
QVERIFY(data.records.isEmpty());
|
||||
//The label line reads the way the cable form names the type.
|
||||
QCOMPARE(CableTypeList::translatedHeader(data.columns), QStringList({
|
||||
QStringLiteral("Désignation"),
|
||||
QStringLiteral("Nombre d'âmes"),
|
||||
QStringLiteral("Couleurs des âmes")}));
|
||||
QStringLiteral("Designation"),
|
||||
QStringLiteral("Number of cores"),
|
||||
QStringLiteral("Core colors")}));
|
||||
|
||||
CableTypeRecord record;
|
||||
record.setValue(QStringLiteral("designation"),
|
||||
|
||||
Reference in New Issue
Block a user