Relates tdf#167632 - Make column label plural aware

Change-Id: I74a13b8e0559e63a127f08b119f6aba06efc5cab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210457
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
This commit is contained in:
Heiko Tietze
2026-09-04 07:36:40 +02:00
committed by Heiko Tietze
parent 5778c8ee6c
commit e7d7f1094c
6 changed files with 19 additions and 4 deletions
@@ -23,7 +23,6 @@ sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width2mf'] labelled-by
sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width1mf'] labelled-by-and-mnemonic
sw/uiconfig/swriter/ui/conditionpage.ui://GtkComboBoxText[@id='filter'] no-labelled-by
sw/uiconfig/swriter/ui/converttexttable.ui://GtkLabel[@id='label4'] orphan-label
sw/uiconfig/swriter/ui/converttexttable.ui://GtkLabel[@id='label16'] orphan-label
sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui://GtkButton[@id='down'] button-no-label
sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui://GtkButton[@id='up'] button-no-label
sw/uiconfig/swriter/ui/editbox.ui://GtkEntry[@id='entry'] no-labelled-by
+2
View File
@@ -316,6 +316,8 @@
$1 of STR_WORDCOUNT_CHARARG_NO_SELECTION is number of characters */
#define STR_WORDCOUNT_CHARARG_NO_SELECTION NNC_("STR_WORDCOUNT_CHARARG_NO_SELECTION", "$1 character", "$1 characters")
#define STR_CONVERT_TEXT_TABLE NC_("STR_CONVERT_TEXT_TABLE", "Convert Text to Table")
// To translators: Static label in Text-to-Table dialog after spin edit how many columns extra to add
#define STR_TEXT_TABLE_COLUMNS NNC_("STR_TEXT_TABLE_COLUMNS", "column", "columns")
#define STR_ADD_AUTOFORMAT_TITLE NC_("STR_ADD_AUTOFORMAT_TITLE", "Add AutoFormat")
#define STR_ADD_AUTOFORMAT_LABEL NC_("STR_ADD_AUTOFORMAT_LABEL", "Name")
#define STR_DEL_AUTOFORMAT_TITLE NC_("STR_DEL_AUTOFORMAT_TITLE", "Delete AutoFormat")
+1 -1
View File
@@ -111,7 +111,7 @@ constexpr short lOutlineMinTextDistance = o3tl::toTwips(15, o3tl::Length::in100)
// defined in sw/source/uibase/app/swmodule.cxx
SW_DLLPUBLIC OUString SwResId(TranslateId aId);
OUString SwResId(TranslateNId aContextSingularPlural, int nCardinality);
SW_DLLPUBLIC OUString SwResId(TranslateNId aContextSingularPlural, int nCardinality);
css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker();
css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator();
+10
View File
@@ -117,6 +117,7 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable)
, m_xBtnFont(m_xBuilder->weld_check_button(u"fontcb"_ustr))
, m_xBtnPattern(m_xBuilder->weld_check_button(u"patterncb"_ustr))
, m_xBtnAlignment(m_xBuilder->weld_check_button(u"alignmentcb"_ustr))
, m_xLabelColumn(m_xBuilder->weld_label(u"lbColumns"_ustr))
, m_aWndPreview(rView.GetWrtShell().IsCursorInTable() ? rView.GetWrtShell().IsTableRightToLeft()
: AllSettings::GetLayoutRTL())
, m_xWndPreview(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aWndPreview))
@@ -167,6 +168,9 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable)
m_xOtherBtn->connect_toggled(aLk);
m_xOtherEd->set_sensitive(m_xOtherBtn->get_active());
m_xColumnNumNF->connect_value_changed(LINK(this, SwConvertTableDlg, ColNumHdl));
ColNumHdl(*m_xColumnNumNF);
const SwModuleOptions* pModOpt = SwModule::get()->GetModuleConfig();
bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_ON);
@@ -288,6 +292,12 @@ IMPL_LINK_NOARG(SwConvertTableDlg, SelFormatHdl, weld::ItemView&, void)
mxTAutoFormat = FillAutoFormatOfIndex();
}
IMPL_LINK(SwConvertTableDlg, ColNumHdl, weld::SpinButton&, rButton, void)
{
const int nCols = rButton.get_value();
m_xLabelColumn->set_label(SwResId(STR_TEXT_TABLE_COLUMNS, nCols));
}
IMPL_LINK(SwConvertTableDlg, BtnHdl, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
+4
View File
@@ -26,6 +26,7 @@
#include <vcl/weld/CheckButton.hxx>
#include <vcl/weld/Container.hxx>
#include <vcl/weld/Entry.hxx>
#include <vcl/weld/Label.hxx>
#include <vcl/weld/RadioButton.hxx>
#include <vcl/weld/SpinButton.hxx>
#include <vcl/weld/TreeView.hxx>
@@ -70,6 +71,8 @@ class SwConvertTableDlg final : public SfxDialogController
std::unique_ptr<weld::CheckButton> m_xBtnFont;
std::unique_ptr<weld::CheckButton> m_xBtnPattern;
std::unique_ptr<weld::CheckButton> m_xBtnAlignment;
std::unique_ptr<weld::Label> m_xLabelColumn;
SvxAutoFmtPreview m_aWndPreview;
std::unique_ptr<weld::CustomWeld> m_xWndPreview;
@@ -81,6 +84,7 @@ class SwConvertTableDlg final : public SfxDialogController
DECL_LINK(RepeatHeaderCheckBoxHdl, weld::Toggleable&, void);
DECL_LINK(CheckHdl, weld::Toggleable&, void);
DECL_LINK(SelFormatHdl, weld::ItemView&, void);
DECL_LINK(ColNumHdl, weld::SpinButton&, void);
public:
SwConvertTableDlg(SwView& rView, bool bToTable);
+2 -2
View File
@@ -441,10 +441,10 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<object class="GtkLabel" id="lbColumns">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="converttexttable|label16">columns</property>
<property name="label">columns</property>
</object>
<packing>
<property name="left-attach">2</property>