Re: [LyX master] Fix display of counters for included listings.
On 2/10/24 22:34, Jürgen Spitzmüller wrote: Am Samstag, dem 10.02.2024 um 12:17 -0500 schrieb Richard Kimberly Heck: Oh, shoot. Should I revert it? Or notify people there is one new string? I'd go for the latter. I think an untranslated string is better than a wrong one. Done. Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX master] Fix display of counters for included listings.
Am Samstag, dem 10.02.2024 um 12:17 -0500 schrieb Richard Kimberly Heck: > Oh, shoot. Should I revert it? Or notify people there is one new > string? I'd go for the latter. I think an untranslated string is better than a wrong one. -- Jürgen -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX master] Fix display of counters for included listings.
On 2/10/24 18:21, Pavel Sanda wrote: On Sat, Feb 10, 2024 at 12:17:57PM -0500, Richard Kimberly Heck wrote: On 2/10/24 03:45, Jürgen Spitzmüller wrote: Am Samstag, dem 10.02.2024 um 00:55 + schrieb Richard Kimberly Heck: The branch, master, has been updated. You are aware that this broke the string freeze, right? So translators should be informed to update once more before the final release. Oh, shoot. Should I revert it? Or notify people there is one new string? Not sure about the best response. Was this regression? No, an oversight in a new feature. I've just tested, and removing the string change doesn't lead to terrible problems, so it's doable. On the other hand, a couple people have already updated the string. Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX master] Fix display of counters for included listings.
On Sat, Feb 10, 2024 at 12:17:57PM -0500, Richard Kimberly Heck wrote: > On 2/10/24 03:45, Jürgen Spitzmüller wrote: > >Am Samstag, dem 10.02.2024 um 00:55 + schrieb Richard Kimberly > >Heck: > >>The branch, master, has been updated. > >You are aware that this broke the string freeze, right? So translators > >should be informed to update once more before the final release. > > Oh, shoot. Should I revert it? Or notify people there is one new string? Not sure about the best response. Was this regression? Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX master] Fix display of counters for included listings.
On 2/10/24 03:45, Jürgen Spitzmüller wrote: Am Samstag, dem 10.02.2024 um 00:55 + schrieb Richard Kimberly Heck: The branch, master, has been updated. You are aware that this broke the string freeze, right? So translators should be informed to update once more before the final release. Oh, shoot. Should I revert it? Or notify people there is one new string? Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX master] Fix display of counters for included listings.
Am Samstag, dem 10.02.2024 um 00:55 + schrieb Richard Kimberly Heck: > The branch, master, has been updated. You are aware that this broke the string freeze, right? So translators should be informed to update once more before the final release. Jürgen > > - Log --- > -- > > commit 91bd457a674579e1bc9e61aab19c272cd0d342dd > Author: Richard Kimberly Heck > Date: Fri Feb 9 19:53:55 2024 -0500 > > Fix display of counters for included listings. > > diff --git a/lib/layouts/stdcounters.inc > b/lib/layouts/stdcounters.inc > index dbebe25b03..ee143f6b0f 100644 > --- a/lib/layouts/stdcounters.inc > +++ b/lib/layouts/stdcounters.inc > @@ -79,6 +79,7 @@ End > > Counter listing > GuiName Listing > + PrettyFormat "Listing ##" > End > > Counter equation > diff --git a/src/insets/InsetInclude.cpp > b/src/insets/InsetInclude.cpp > index 916196211a..92ec17169c 100644 > --- a/src/insets/InsetInclude.cpp > +++ b/src/insets/InsetInclude.cpp > @@ -1444,22 +1444,28 @@ void InsetInclude::updateBuffer(ParIterator > const & it, UpdateType utype, bool c > if (!isListings(params())) > return; > > + Buffer const & master = *buffer().masterBuffer(); > + listings_label_ = master.B_("Program Listing"); > + Counters & counters = > master.params().documentClass().counters(); > + docstring const cnt = from_ascii("listing"); > + bool const hasCounter = counters.hasCounter(cnt); > + if (hasCounter) { > + counters.saveLastCounter(); > + counters.step(cnt, utype); > + listings_label_ += " " + > convert(counters.value(cnt)); > + } > + > if (label_) > label_->updateBuffer(it, utype, deleted); > > + if (hasCounter) > + counters.restoreLastCounter(); > + > InsetListingsParams const > par(to_utf8(params()["lstparams"])); > if (par.getParamValue("caption").empty()) { > listings_label_ = buffer().B_("Program Listing"); > return; > } > - Buffer const & master = *buffer().masterBuffer(); > - Counters & counters = > master.params().documentClass().counters(); > - docstring const cnt = from_ascii("listing"); > - listings_label_ = master.B_("Program Listing"); > - if (counters.hasCounter(cnt)) { > - counters.step(cnt, utype); > - listings_label_ += " " + > convert(counters.value(cnt)); > - } > } > > > > - > -- > > Summary of changes: > lib/layouts/stdcounters.inc | 1 + > src/insets/InsetInclude.cpp | 22 ++ > 2 files changed, 15 insertions(+), 8 deletions(-) > > > hooks/post-receive > -- > The LyX Source Repository -- Univ.-Prof. Dr. Jürgen Spitzmüller Universitätsprofessur für Angewandte Sprachwissenschaft Universität Wien Institut für Sprachwissenschaft Sensengasse 3a A-1090 Wien Tel +43 (0)1 4277 417 24 Fax +43 (0)1 4277 9 417 http://linguistics.univie.ac.at http://www.spitzmueller.org VCard: http://www.spitzmueller.org/docs/jsp.vcf signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel