On 05/01/2018 02:38 PM, Kornel Benko wrote:
>
> Am Dienstag, 1. Mai 2018 13:55:56 CEST schrieb Richard Heck
> <rgh...@lyx.org>:
>
> > On 04/26/2018 01:43 AM, Kornel Benko wrote:
>
> > >
>
> > > Am Donnerstag, 26. April 2018 00:44:52 CEST schrieb Richard Kimberly
>
> > > Heck <rikih...@lyx.org>:
>
> > >
>
> > > > commit 821e10154739aa23191998b88a4bb7d9e0390628
>
> > >
>
> > > > Author: Richard Kimberly Heck <rikih...@lyx.org>
>
> > >
>
> > > > Date:   Wed Apr 25 18:43:49 2018 -0400
>
> > >
>
> > > >
>
> > >
>
> > > >     Improve error message a bit more.
>
> > >
>
> > > >     
>
> > >
>
> > > >     Sorry to Kornel, who had already updated sk.po!
>
> > >
>
> > >  
>
> > >
>
> > > No problem. Sometimes I wish, some messages to translate were split
>
> > > into more parts.
>
> > >
>
> > > Like
>
> > >
>
> > > bformat(_("Part 1") + _("Part 2") + ... ), from_ascii(filePath())));
>
> > >
>
> > > Is that possible?
>
> > >
>
> > >  
>
> > >
>
> > > On very long strings (see for instance the usage message) this would
>
> > > be handy.
>
> > >
>
> > >  
>
> > >
>
> >
>
> > Can you explain how that would be handy? How would you want
>
> > to split it up in this case?
>
>  
>
> Take for instance the help message.
>
> Command line switches (case sensitive):
>
> -help summarize LyX usage
>
> -userdir dir set user directory to dir
>
> -sysdir dir set system directory to dir
>
> -geometry WxH+X+Y set geometry of the main window
>
> -dbg feature[,feature]...
>
> select the features to debug.
>
> Type `lyx -dbg' to see the list of features
>
> -x [--execute] command
>
> where command is a lyx command.
>
> -e [--export] fmt
>
> where fmt is the export format of choice. Look in
>
> Tools->Preferences->File Handling->File Formats->Short Name
>
> to see which parameter (which differs from the format name
>
> in the File->Export menu) should be passed. To export to
>
> the document's default output format, use 'default'.
>
> Note that the order of -e and -x switches matters.
>
> -E [--export-to] fmt filename
>
> where fmt is the export format of choice (see --export),
>
> and filename is the destination filename.
>
> -i [--import] fmt file.xxx
>
> where fmt is the import format of choice
>
> and file.xxx is the file to be imported.
>
> -f [--force-overwrite] what
>
> where what is either `all', `main' or `none',
>
> specifying whether all files, main file only, or no files,
>
> respectively, are to be overwritten during a batch export.
>
> Anything else is equivalent to `all', but is not consumed.
>
> --ignore-error-message which
>
> allows you to ignore specific LaTeX error messages.
>
> Do not use for final documents! Currently supported values:
>
> * missing_glyphs: Fontspec `missing glyphs' error.
>
> -n [--no-remote]
>
> open documents in a new instance
>
> -r [--remote]
>
> open documents in an already running instance
>
> (a working lyxpipe is needed)
>
> -v [--verbose]
>
> report on terminal about spawned commands.
>
> -batch execute commands without launching GUI and exit.
>
> -version summarize version and build info
>
>  
>
> It would be handy if each switch would have own translation. Changing
> a dot anywhere, and you go crazy searching for the difference.
>

That one is easy: It's just a single string, and it could just be split.
I suppose the
question is: Is it worth making work now for the translators by doing so
in order
possibly to save them work later?

>  In your case,
>
>                        bformat(_("The directory path to the
> document\n%1$s\n"
>
>                            "contains spaces, but your TeX installation
> does "
>
>                            "not allow them. You should save the file
> to a directory "
>
>                             "whose name does not contain spaces."),
> from_ascii(filePath())));
>
> There are 2 phrases.
>
> The directory path to the document\n%1$s\n"
>
>                            "contains spaces, but your TeX installation
> does not allow them."
>
> and
>
> "You should save the file to a directory whose name does not contain
> spaces.
>
>  
>
> This way, only the second phrase would have changed.
>

In this case, too, it should be no problem, since we can just split the
string
into two parts, as in the attached. Same question whether it's worth it now.

Riki

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 043f0cc..5d3ded2 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -4365,8 +4365,9 @@ Buffer::ExportStatus Buffer::doExport(string const & 
target, bool put_in_tempdir
                Alert::error(_("File name error"),
                        bformat(_("The directory path to the document\n%1$s\n"
                            "contains spaces, but your TeX installation does "
-                           "not allow them. You should save the file to a 
directory "
-                                       "whose name does not contain spaces."), 
from_ascii(filePath())));
+                               "not allow them."), from_ascii(filePath())) +
+                       _("You should save the file to a directory "
+                         "whose name does not contain spaces."));
                return ExportTexPathHasSpaces;
        } else {
                runparams.nice = false;

Reply via email to