mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 07:29:29 +02:00
Don't use \n sequence inside Lisp strings needing translation...
... Because xgettext will just remove the \, not replace \n with newline. That's consistent with Lisp reader behavior in this documentation: http://www.lispworks.com/documentation/lw70/CLHS/Body/02_de.htm The XLisp reader, which replaces \n with newline, is nonstandard. So, to accommodate xgettext, use (format nil "...~%...") instead, or where you can't do that in a $ header line, just make a line break inside the "" There are a few "\n" left alone in sample-data-export.ny which are neither in $ lines nor inside (_ "...")
This commit is contained in:
parent
da39cc451f
commit
ac9148e48f
@ -5,7 +5,10 @@
|
||||
$name (_"Silence Finder")
|
||||
;manpage "Silence_Finder"
|
||||
$action (_"Finding silence...")
|
||||
$info (_"Adds point labels in areas of silence according to the specified\nlevel and duration of silence. If too many silences are detected,\nincrease the silence level and duration; if too few are detected,\nreduce the level and duration.")
|
||||
$info (_"Adds point labels in areas of silence according to the specified
|
||||
level and duration of silence. If too many silences are detected,
|
||||
increase the silence level and duration; if too few are detected,
|
||||
reduce the level and duration.")
|
||||
$author (_"Alex S. Brown")
|
||||
$copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
|
||||
@ -111,6 +114,6 @@ s-in))
|
||||
|
||||
;If no silence markers were found, return a message
|
||||
(if (null l)
|
||||
(setq l (_"No silences found. Try reducing the silence\nlevel and minimum silence duration."))
|
||||
(setq l (format nil (_"No silences found. Try reducing the silence~%level and minimum silence duration.")))
|
||||
)
|
||||
l
|
||||
|
@ -5,7 +5,10 @@
|
||||
$name (_"Sound Finder")
|
||||
;manpage "Sound_Finder"
|
||||
$action (_"Finding sound...")
|
||||
$info (_"Adds region labels for areas of sound according to the specified level\nand duration of surrounding silence. If too many labels are produced,\nincrease the silence level and duration; if too few are produced,\nreduce the level and duration.")
|
||||
$info (_"Adds region labels for areas of sound according to the specified level
|
||||
and duration of surrounding silence. If too many labels are produced,
|
||||
increase the silence level and duration; if too few are produced,
|
||||
reduce the level and duration.")
|
||||
$author (_"Jeremy R. Brown")
|
||||
$copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
|
||||
@ -149,7 +152,7 @@ s-in))
|
||||
;If no sound markers were found, return a message
|
||||
;Otherwise, if some sounds were found, also optionally place a label at the end of the file.
|
||||
(if (null l)
|
||||
(setq l (_"No sounds found. Try reducing the silence\nlevel and minimum silence duration."))
|
||||
(setq l (format nil (_"No sounds found. Try reducing the silence~%level and minimum silence duration.")))
|
||||
(if (= finallabel 1) (add-label (/ s1-length s1-srate) (/ s1-length s1-srate) (_"[End]")))
|
||||
)
|
||||
l
|
||||
|
@ -62,5 +62,5 @@ $copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
(prod (diff 1.0 env) sig))))))
|
||||
|
||||
(catch 'error-message
|
||||
(setf p-err (_"Error.\n"))
|
||||
(setf p-err (format nil (_"Error.~%")))
|
||||
(multichan-expand #'result *track*))
|
||||
|
@ -59,7 +59,7 @@ $control control-gain (_"Gain (dB)") real "" 0 -24 24
|
||||
(prod (diff 1.0 env) sig))))))
|
||||
|
||||
(catch 'error-message
|
||||
(setf p-err (_"Error.\n"))
|
||||
(setf p-err (format nil (_"Error.~%")))
|
||||
(if (= control-gain 0)
|
||||
nil ; Do nothing
|
||||
(multichan-expand #'result *track*)))
|
||||
|
@ -67,7 +67,7 @@ $control control-gain (_"Gain (dB)") real "" 0 -24 24
|
||||
(prod (diff 1.0 env) sig)))))))
|
||||
|
||||
(catch 'error-message
|
||||
(setf p-err (_"Error.\n"))
|
||||
(setf p-err (format nil (_"Error.~%")))
|
||||
(if (= control-gain 0)
|
||||
nil ; Do nothing
|
||||
(multichan-expand #'result *track*)))
|
||||
|
@ -39,7 +39,7 @@ $copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
|
||||
(let ((dur (get-duration 1)))
|
||||
(cond
|
||||
((< len 3) (_"Selection too short.\nIt must be more than 2 samples."))
|
||||
((< len 3) (format nil (_"Selection too short.~%It must be more than 2 samples.")))
|
||||
((< dur 0.2) (mult s (r-cos dur)))
|
||||
(t (mult (filter s dur)(r-cos dur)))))
|
||||
|
||||
|
@ -23,7 +23,8 @@ $control curve (_"Mid-fade Adjust (%)") real "" 0 -100 100
|
||||
$control units (_"Start/End as") choice ((_"% of Original") (_"dB Gain")) 0
|
||||
$control gain0 (_"Start (or end)") float-text "" 0 nil nil
|
||||
$control gain1 (_"End (or start)") float-text "" 100 nil nil
|
||||
$control preset (_" Handy Presets\n(override controls)") choice (
|
||||
$control preset (_" Handy Presets
|
||||
(override controls)") choice (
|
||||
(_"None Selected")
|
||||
(_"Linear In") (_"Linear Out")
|
||||
(_"Exponential In") (_"Exponential Out")
|
||||
@ -192,7 +193,7 @@ selection length, but preview only needs to process preview length."
|
||||
(setf curve (/ curve 100.0))
|
||||
(setf gain0 (gainscale gain0 units))
|
||||
(setf gain1 (gainscale gain1 units))
|
||||
(setf err (_"Error\n\n"))
|
||||
(setf err (format nil (_"Error~%~%")))
|
||||
|
||||
|
||||
(catch 'err (fade *track* type curve gain0 gain1))
|
||||
|
@ -37,8 +37,8 @@ $copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
;; 2) The selection may not start or end in white-space.
|
||||
|
||||
|
||||
(setf err1 (_"Error.\nInvalid selection.\nMore than 2 audio clips selected."))
|
||||
(setf err2 (_"Error.\nInvalid selection.\nEmpty space at start/ end of the selection."))
|
||||
(setf err1 (format nil (_"Error.~%Invalid selection.~%More than 2 audio clips selected.")))
|
||||
(setf err2 (format nil (_"Error.~%Invalid selection.~%Empty space at start/ end of the selection.")))
|
||||
|
||||
|
||||
(defun find-ends (T0 T1 clips)
|
||||
@ -128,4 +128,4 @@ $copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
(get '*selection* 'start)
|
||||
(get '*selection* 'end)
|
||||
(get '*track* 'clips)))
|
||||
(_"Error.\nCrossfade Clips may only be applied to one track."))
|
||||
(format nil (_"Error.~%Crossfade Clips may only be applied to one track.")))
|
||||
|
@ -72,5 +72,5 @@ audio clip, fade in, otherwise fade out."
|
||||
(if (< in-dist out-dist) 'in 'out)))
|
||||
|
||||
(if (< (length (get '*selection* 'tracks)) 2)
|
||||
(_"Error.\nSelect 2 (or more) tracks to crossfade.")
|
||||
(format nil (_"Error.~%Select 2 (or more) tracks to crossfade."))
|
||||
(crossfade type direction curve))
|
||||
|
@ -18,8 +18,10 @@ $copyright (_"Released under terms of the GNU General Public License version 2")
|
||||
;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
|
||||
|
||||
$control type (_"Type") choice ((_"Soft Limit") (_"Hard Limit") (_"Soft Clip") (_"Hard Clip")) 0
|
||||
$control gain-L (_"Input Gain (dB)\nmono/Left") real "" 0 0 10
|
||||
$control gain-R (_"Input Gain (dB)\nRight channel") real "" 0 0 10
|
||||
$control gain-L (_"Input Gain (dB)
|
||||
mono/Left") real "" 0 0 10
|
||||
$control gain-R (_"Input Gain (dB)
|
||||
Right channel") real "" 0 0 10
|
||||
$control thresh (_"Limit to (dB)") real "" -3 -10 0
|
||||
$control hold (_"Hold (ms)") real "" 10 1 50
|
||||
$control makeup (_"Apply Make-up Gain") choice ((_"No") (_"Yes")) 0
|
||||
|
@ -582,14 +582,14 @@ Daulton") " (<a href=
|
||||
(putprop 'info
|
||||
(cond
|
||||
((and (= fileformat 3)(= chan 0)) ; csv, channel in column
|
||||
(_"One column per channel.\n"))
|
||||
(format nil (_"One column per channel.~%")))
|
||||
((and (= fileformat 3)(= chan 2)) ; csv, channel in row
|
||||
(_"One row per channel.\n"))
|
||||
(format nil (_"One row per channel.~%")))
|
||||
((or (soundp s)(= fileformat 4)) ; mono soundor HTML
|
||||
"")
|
||||
((= chan 0) (_"Left channel then Right channel on same line.\n"))
|
||||
((= chan 1) (_"Left and right channels on alternate lines.\n"))
|
||||
((= chan 2) (_"Left channel first then right channel.\n"))
|
||||
((= chan 0) (format nil (_"Left channel then Right channel on same line.~%")))
|
||||
((= chan 1) (format nil (_"Left and right channels on alternate lines.~%")))
|
||||
((= chan 2) (format nil (_"Left channel first then right channel.~%")))
|
||||
(T (_"Unspecified channel order")))
|
||||
'chan-order))
|
||||
|
||||
|
@ -107,21 +107,23 @@ $control bad-data (_"Invalid data handling") choice ((_"Throw error") (_"Read as
|
||||
(defun fileopensp (path fname)
|
||||
(let ((path (string-trim " " path)))
|
||||
(if (string-equal fname "")
|
||||
(throw 'err (_"Error\nNo file name.")))
|
||||
(throw 'err (format nil (_"Error~%No file name."))))
|
||||
(if (string-not-equal fname ".txt" :start1 (- (length fname) 4))
|
||||
(throw 'err (_"Error\nThe file must be a plain ASCII text file\nwith '.txt' file extension.")))
|
||||
(throw 'err (format nil (_"Error~%The file must be a plain ASCII text file~%with '.txt' file extension."))))
|
||||
;; Handle special 'path' formats:
|
||||
(cond
|
||||
; "~" without "/" is not recommended (or documented)
|
||||
; but more user friendly to allow it.
|
||||
((string= path "~")
|
||||
(if (windowsp)
|
||||
(_"Error\n'~/' is not valid on Windows")
|
||||
;i18n-hint: ~~ format directive must be preserved; displays as one ~
|
||||
(format nil (_"Error~%'~~/' is not valid on Windows"))
|
||||
(setq path (home))))
|
||||
;; replace "~/" on Linux/Mac
|
||||
((and (>= (length path) 2) (string= path "~/" :end1 2))
|
||||
(if (windowsp)
|
||||
(_"Error\n'~/' is not valid on Windows")
|
||||
;i18n-hint: ~~ format directive must be preserved; displays as one ~
|
||||
(format nil (_"Error~%'~~/' is not valid on Windows"))
|
||||
(setq path (strcat (home)(subseq path 1)))))
|
||||
((string-equal path (_"Home directory"))
|
||||
(setf path (home)))
|
||||
@ -195,7 +197,7 @@ $control bad-data (_"Invalid data handling") choice ((_"Throw error") (_"Read as
|
||||
(defun sound-from-file (filename)
|
||||
;; Set path. fileopenp should return 'true'
|
||||
(if (not (fileopensp path filename))
|
||||
(throw 'err (_"Error.\nUnable to open file")))
|
||||
(throw 'err (format nil (_"Error.~%Unable to open file"))))
|
||||
; Note: we can't use (arrayp *track*) because
|
||||
; *track* is nil in generate type plug-ins.
|
||||
(cond
|
||||
|
@ -136,4 +136,4 @@ $control radar-f (_"Frequency of Radar Needles (Hz)") real "" 30 1 100
|
||||
(0 s) ; let Audacity coerce back to stereo
|
||||
(1 (vector original s)))))
|
||||
(t ; this effect isn't meant for mono
|
||||
(_"Error.\nStereo track required.")))
|
||||
(format nil (_"Error.~%Stereo track required."))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user