Mael Hilléreau <[EMAIL PROTECTED]> writes: > However, I noticed that when switching the document language > (Document>Settings>Language), one have to reload the doc for the > labels to be translated in the newly selected language.
Does this solve the problem? (you will probably need to use transl2-v1.diff until we figure out what is wrong). JMarc
Index: src/frontends/controllers/ControlDocument.cpp =================================================================== --- src/frontends/controllers/ControlDocument.cpp (revision 19320) +++ src/frontends/controllers/ControlDocument.cpp (working copy) @@ -109,7 +109,7 @@ void ControlDocument::dispatchParams() { // This must come first so that a language change is correctly noticed - setLanguage(); + const bool lang_changed = setLanguage(); // Set the document class. textclass_type const old_class = @@ -127,7 +127,7 @@ dispatch_bufferparams(kernel(), params(), LFUN_BUFFER_PARAMS_APPLY); // redo the numbering if necessary - if (new_secnumdepth != old_secnumdepth) + if (new_secnumdepth != old_secnumdepth || lang_changed) updateLabels(kernel().buffer()); // Generate the colours requested by each new branch. @@ -155,14 +155,15 @@ } -void ControlDocument::setLanguage() const +bool ControlDocument::setLanguage() const { Language const * const newL = bp_->language; if (kernel().buffer().params().language == newL) - return; + return false; string const lang_name = newL->lang(); kernel().dispatch(FuncRequest(LFUN_BUFFER_LANGUAGE, lang_name)); + return true; } Index: src/frontends/controllers/ControlDocument.h =================================================================== --- src/frontends/controllers/ControlDocument.h (revision 19320) +++ src/frontends/controllers/ControlDocument.h (working copy) @@ -54,9 +54,9 @@ BufferParams & params() const; /// BufferId id() const; + /// Returns true if language has changed. + bool setLanguage() const; /// - void setLanguage() const; - /// void saveAsDefault() const; /// bool loadTextclass(textclass_type tc) const;