unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* prevent inserting \n symbol in the end of lines in emacs po-mode
@ 2019-04-13 16:45 znavko
  2019-04-13 17:53 ` pelzflorian (Florian Pelz)
  2019-04-16 18:38 ` znavko
  0 siblings, 2 replies; 4+ messages in thread
From: znavko @ 2019-04-13 16:45 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

When editing .po file in emacs po-mode and inserting two lines into msgstr, emacs adds "n" symbol.
And it breaks the logic here:

#. type: Plain text
#: doc/contributing.texi:141
msgid ""
"@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile "
"Reference Manual}):"
msgstr ""
"@dots{} и для REPL (@pxref{Using Guile Interactively,,, guile, Guilen"
"Reference Manual}):"

http://0x0.st/zNAS.png (http://0x0.st/zNAS.png)

I think link to Guile Reference manual will not work with n in the middle of it.

I've enabled long-line-mode as described here https://www.emacswiki.org/emacs/PoMode (https://www.emacswiki.org/emacs/PoMode) (and including longlines.el into .emacs)
So I can create long-long lines and they are displaying convenient way. And I've compared french translation does not follow the same line length rule as in original po file: http://0x0.st/zNmQ.png

But nevertheless is it necessary to insert translation messages strings with line breaks but without emacs insert 'n' in the end of line?

[-- Attachment #2: Type: text/html, Size: 1685 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent inserting \n symbol in the end of lines in emacs po-mode
  2019-04-13 16:45 prevent inserting \n symbol in the end of lines in emacs po-mode znavko
@ 2019-04-13 17:53 ` pelzflorian (Florian Pelz)
  2019-04-16 18:38 ` znavko
  1 sibling, 0 replies; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-04-13 17:53 UTC (permalink / raw)
  To: znavko; +Cc: help-guix

On Sat, Apr 13, 2019 at 04:45:21PM +0000, znavko@disroot.org wrote:
> When editing .po file in emacs po-mode and inserting two lines into
> msgstr, emacs adds "n" symbol.
>
> And it breaks the logic here:
> 
> #. type: Plain text
> #: doc/contributing.texi:141
> msgid ""
> "@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile "
> "Reference Manual}):"
> msgstr ""
> "@dots{} и для REPL (@pxref{Using Guile Interactively,,, guile, Guilen"
> "Reference Manual}):"
> 
> http://0x0.st/zNAS.png (http://0x0.st/zNAS.png)
> 
> I think link to Guile Reference manual will not work with n in the
> middle of it.
> 

This \n is printed in place of a newline character.  I believe you
have wrapped the paragraph to multiple lines when it must be on a
single line.  Normally I press Ctrl+J to copy the original msgid and
adapt it without adding newlines.



> I've enabled long-line-mode as described here
> https://www.emacswiki.org/emacs/PoMode
> (https://www.emacswiki.org/emacs/PoMode) (and including longlines.el
> into .emacs)
>
> So I can create long-long lines and they are displaying convenient
> way. And I've compared french translation does not follow the same
> line length rule as in original po file: http://0x0.st/zNmQ.png
>

When you open the French PO file and start editing the msgstr in
emacs’ po-mode, you will see it has no line wrapping any more.  The
paragraph that was a single line must be on a single line when editing
it in emacs’ po-mode.



> But nevertheless is it necessary to insert translation messages
> strings with line breaks but without emacs insert 'n' in the end of
> line?



I do not know emacs well enough.  Maybe there is a way to print long
lines more nicely, but I just go with an ugly long line.  A single
line must remain a single line for the po-mode logic.

Regards,
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent inserting \n symbol in the end of lines in emacs po-mode
  2019-04-13 16:45 prevent inserting \n symbol in the end of lines in emacs po-mode znavko
  2019-04-13 17:53 ` pelzflorian (Florian Pelz)
@ 2019-04-16 18:38 ` znavko
  2019-04-16 19:18   ` pelzflorian (Florian Pelz)
  1 sibling, 1 reply; 4+ messages in thread
From: znavko @ 2019-04-16 18:38 UTC (permalink / raw)
  To: pelzflorian (Florian Pelz); +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]

Hello, Florian! You said 'Normally I press Ctrl+J to copy the original msgid and adapt it without adding newlines.'
Give me detailed instruction how to add this option into my emacs?
I use emacs + pomode, and I press Return to get new area for translate. But pressing Ctrl + J there really insert a new line.
I want to insert original msgid without changes.
Now I need to copy it and it is copying with dustbin n and " symbols and also screening quotes: ".
It is so hard to copy and paste Scheme multi-line code and then edit it.
How to insert exact copy without dustbin symbols?

For example I'm on this msgid. It's not easy to erase this garbage in the end and start of lines, also ":

"(define my-packagen"
" (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")n"
" (revision "1")) ;Guix package revisionn"
" (packagen"
" (version (git-version "0.9" revision commit))n"
" (source (originn"
" (method git-fetch)n"
" (uri (git-referencen"
" (url "git://example.org/my-package.git")n"
" (commit commit)))n"
" (sha256 (base32 "1mbikn@dots{}"))n"
" (file-name (git-file-name name version))))n"
" ;; @dots{}n"
" )))n"

Sure I can use regexp, but it takes time without any good.

April 13, 2019 5:58 PM, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de (mailto:pelzflorian@pelzflorian.de)> wrote:
 On Sat, Apr 13, 2019 at 04:45:21PM +0000, znavko@disroot.org (mailto:znavko@disroot.org) wrote:
 When editing .po file in emacs po-mode and inserting two lines into
msgstr, emacs adds "n" symbol.

And it breaks the logic here:

#. type: Plain text
#: doc/contributing.texi:141
msgid ""
"@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile "
"Reference Manual}):"
msgstr ""
"@dots{} и для REPL (@pxref{Using Guile Interactively,,, guile, Guilen"
"Reference Manual}):"

http://0x0.st/zNAS.png (http://0x0.st/zNAS.png) (http://0x0.st/zNAS.png (http://0x0.st/zNAS.png))

I think link to Guile Reference manual will not work with n in the
middle of it. 

This n is printed in place of a newline character. I believe you
have wrapped the paragraph to multiple lines when it must be on a
single line. Normally I press Ctrl+J to copy the original msgid and
adapt it without adding newlines.
 I've enabled long-line-mode as described here
https://www.emacswiki.org/emacs/PoMode (https://www.emacswiki.org/emacs/PoMode)
(https://www.emacswiki.org/emacs/PoMode (https://www.emacswiki.org/emacs/PoMode)) (and including longlines.el
into .emacs)

So I can create long-long lines and they are displaying convenient
way. And I've compared french translation does not follow the same
line length rule as in original po file: http://0x0.st/zNmQ.png (http://0x0.st/zNmQ.png)  

When you open the French PO file and start editing the msgstr in
emacs’ po-mode, you will see it has no line wrapping any more. The
paragraph that was a single line must be on a single line when editing
it in emacs’ po-mode.
 But nevertheless is it necessary to insert translation messages
strings with line breaks but without emacs insert 'n' in the end of
line? 

I do not know emacs well enough. Maybe there is a way to print long
lines more nicely, but I just go with an ugly long line. A single
line must remain a single line for the po-mode logic.

Regards,
Florian

[-- Attachment #2: Type: text/html, Size: 4232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent inserting \n symbol in the end of lines in emacs po-mode
  2019-04-16 18:38 ` znavko
@ 2019-04-16 19:18   ` pelzflorian (Florian Pelz)
  0 siblings, 0 replies; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2019-04-16 19:18 UTC (permalink / raw)
  To: znavko; +Cc: help-guix

On Tue, Apr 16, 2019 at 06:38:43PM +0000, znavko@disroot.org wrote:
> Hello, Florian! You said 'Normally I press Ctrl+J to copy the original msgid and adapt it without adding newlines.'
> Give me detailed instruction how to add this option into my emacs?
> I use emacs + pomode, and I press Return to get new area for translate. But pressing Ctrl + J there really insert a new line.
> I want to insert original msgid without changes.

It is all correct except you need to press Ctrl+J before pressing
Enter to select the message.





> Now I need to copy it and it is copying with dustbin n and " symbols and also screening quotes: ".
> It is so hard to copy and paste Scheme multi-line code and then edit it.
> How to insert exact copy without dustbin symbols?
> 
> For example I'm on this msgid. It's not easy to erase this garbage in the end and start of lines, also ":
> 
> "(define my-packagen"
> " (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")n"
> " (revision "1")) ;Guix package revisionn"
> " (packagen"
> " (version (git-version "0.9" revision commit))n"
> " (source (originn"
> " (method git-fetch)n"
> " (uri (git-referencen"
> " (url "git://example.org/my-package.git")n"
> " (commit commit)))n"
> " (sha256 (base32 "1mbikn@dots{}"))n"
> " (file-name (git-file-name name version))))n"
> " ;; @dots{}n"
> " )))n"
> 
> Sure I can use regexp, but it takes time without any good.
> 

Yes this will not be necessary.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-16 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-13 16:45 prevent inserting \n symbol in the end of lines in emacs po-mode znavko
2019-04-13 17:53 ` pelzflorian (Florian Pelz)
2019-04-16 18:38 ` znavko
2019-04-16 19:18   ` pelzflorian (Florian Pelz)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).