diff --git a/plug-ins/SilenceMarker.ny b/plug-ins/SilenceMarker.ny index 9377a5f15..a98d7f9b4 100644 --- a/plug-ins/SilenceMarker.ny +++ b/plug-ins/SilenceMarker.ny @@ -2,20 +2,23 @@ ;version 1 ;type analyze ;categories "http://lv2plug.in/ns/lv2core#AnalyserPlugin" -;name "Silence Finder..." +$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." -;author "Alex S. Brown" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Finding silence...") +$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") ;; by Alex S. Brown, PMP (http://www.alexsbrown.com) ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -;control sil-lev "Treat audio below this level as silence [ -dB]" real "" 26 0 100 -;control sil-dur "Minimum duration of silence [seconds]" real "" 1.0 0.1 5.0 -;control labelbeforedur "Label placement [seconds before silence ends]" real "" 0.3 0.0 1.0 +$control sil-lev (_"Treat audio below this level as silence [ -dB]") real "" 26 0 100 +$control sil-dur (_"Minimum duration of silence [seconds]") real "" 1.0 0.1 5.0 +$control labelbeforedur (_"Label placement [seconds before silence ends]") real "" 0.3 0.0 1.0 ;Create a function to make the sum the two channels if they are stereo (defun mono-s (s-in) (if (arrayp s-in) (snd-add (aref s-in 0) (aref s-in 1)) @@ -88,6 +91,7 @@ s-in)) (if (and (> v thres) (> sil-c sil-length)) ;Mark the user-set number of seconds BEFORE this point to avoid clipping the start ;of the material. +; Should "S" be translated or become a control value? (add-label (- (/ n s1-srate) labelbeforedur) "S") ) ;If this sample is NOT silent, then reset the silence counter @@ -110,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 diff --git a/plug-ins/SoundFinder.ny b/plug-ins/SoundFinder.ny index 042ff9d9c..029ef21ff 100644 --- a/plug-ins/SoundFinder.ny +++ b/plug-ins/SoundFinder.ny @@ -2,23 +2,26 @@ ;version 1 ;type analyze ;categories "http://lv2plug.in/ns/lv2core#AnalyserPlugin" -;name "Sound Finder..." +$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." -;author "Jeremy R. Brown" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Finding sound...") +$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") ;; by Jeremy R. Brown (http://www.jeremy-brown.com/) ;; based on the Silence Finder script by Alex S. Brown (http://www.alexsbrown.com) ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -;control sil-lev "Treat audio below this level as silence [ -dB]" real "" 26 0 100 -;control sil-dur "Minimum duration of silence between sounds [seconds]" real "" 1.0 0.1 5.0 -;control labelbeforedur "Label starting point [seconds before sound starts]" real "" 0.1 0.0 1.0 -;control labelafterdur "Label ending point [seconds after sound ends]" real "" 0.1 0.0 1.0 -;control finallabel "Add a label at the end of the track? [No=0, Yes=1]" int "" 0 0 1 +$control sil-lev (_"Treat audio below this level as silence [ -dB]") real "" 26 0 100 +$control sil-dur (_"Minimum duration of silence between sounds [seconds]") real "" 1.0 0.1 5.0 +$control labelbeforedur (_"Label starting point [seconds before sound starts]") real "" 0.1 0.0 1.0 +$control labelafterdur (_"Label ending point [seconds after sound ends]") real "" 0.1 0.0 1.0 +$control finallabel (_"Add a label at the end of the track? [No=0, Yes=1]") int "" 0 0 1 ;30Dec09: couple of changes made to default control values by Gale Andrews @@ -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.") - (if (= finallabel 1) (add-label (/ s1-length s1-srate) (/ s1-length s1-srate) "[End]")) + (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 diff --git a/plug-ins/SpectralEditMulti.ny b/plug-ins/SpectralEditMulti.ny index 2e8ca2400..5a402edb4 100644 --- a/plug-ins/SpectralEditMulti.ny +++ b/plug-ins/SpectralEditMulti.ny @@ -1,11 +1,11 @@ ;nyquist plug-in ;version 4 ;type process spectral -;name "Spectral edit multi tool" +$name (_"Spectral edit multi tool") ;manpage "Spectral_edit_multi_tool" -;action "Filtering..." -;author "Paul Licameli" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Filtering...") +$author (_"Paul Licameli") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; SpectralEditMulti.ny by Paul Licameli, November 2014. ;; Updated by Steve Daulton 2014 / 2015. @@ -33,20 +33,21 @@ (env (snd-pwl 0.0 rate breakpoints))) (cond ((not (or f0 f1)) ; This should never happen for a 'spectral' effect. - (throw 'error-message "Please select frequencies.")) + (throw 'error-message + (format nil (_"~aPlease select frequencies.") p-err))) ((and f0 f1 (= f0 f1)) (throw 'error-message - (format nil "~aBandwidth is zero (the upper and lower~%~ + (format nil (_"~aBandwidth is zero (the upper and lower~%~ frequencies are both ~a Hz).~%~ - Please select a frequency range." + Please select a frequency range.") p-err f0))) ;; Biqud filter fails if centre frequency is very low and bandwidth very high. ;; 'Magic numbers' 10 Hz and 10 octaves are experimental. ((and f0 (< f0 10) (or (not bw)(> bw 10))) (throw 'error-message - (format nil "~aNotch filter parameters cannot be applied.~%~ + (format nil (_"~aNotch filter parameters cannot be applied.~%~ Try increasing the low frequency bound~%~ - or reduce the filter 'Width'." + or reduce the filter 'Width'.") p-err))) ;; low pass frequency is above Nyquist so do nothing ((and (not f1) (>= f0 (/ *sound-srate* 2.0))) @@ -61,5 +62,5 @@ (prod (diff 1.0 env) sig)))))) (catch 'error-message - (setf p-err "Error.\n") + (setf p-err (format nil (_"Error.~%"))) (multichan-expand #'result *track*)) diff --git a/plug-ins/SpectralEditParametricEQ.ny b/plug-ins/SpectralEditParametricEQ.ny index 8d7d3a35d..2d22c4126 100644 --- a/plug-ins/SpectralEditParametricEQ.ny +++ b/plug-ins/SpectralEditParametricEQ.ny @@ -2,18 +2,18 @@ ;version 4 ;type process spectral ;preview linear -;name "Spectral edit parametric EQ..." +$name (_"Spectral edit parametric EQ") ;manpage "Spectral_edit_parametric_EQ" -;action "Filtering..." -;author "Paul Licameli" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Filtering...") +$author (_"Paul Licameli") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; SpectralEditParametricEQ.ny by Paul Licameli, November 2014. ;; Updated by Steve Daulton 2014 / 2015. ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -;control control-gain "Gain (dB)" real "" 0 -24 24 +$control control-gain (_"Gain (dB)") real "" 0 -24 24 (defun wet (sig gain fc bw) (eq-band sig fc gain (/ bw 2))) @@ -33,24 +33,24 @@ (env (snd-pwl 0.0 rate breakpoints))) (cond ((not (or f0 f1)) ; This should never happen for a 'spectral' effect. - (throw 'error-message (format nil "~aPlease select frequencies." p-err))) + (throw 'error-message (format nil (_"~aPlease select frequencies.") p-err))) ((not f0) - (throw 'error-message (format nil "~aLow frequency is undefined." p-err))) + (throw 'error-message (format nil (_"~aLow frequency is undefined.") p-err))) ((not f1) - (throw 'error-message (format nil "~aHigh frequency is undefined." p-err))) + (throw 'error-message (format nil (_"~aHigh frequency is undefined.") p-err))) ((and fc (= fc 0)) - (throw 'error-message (format nil "~aCenter frequency must be above 0 Hz." p-err))) + (throw 'error-message (format nil (_"~aCenter frequency must be above 0 Hz.") p-err))) ((and f1 (> f1 (/ *sound-srate* 2))) (throw 'error-message - (format nil "~aFrequency selection is too high for track sample rate. + (format nil (_"~aFrequency selection is too high for track sample rate.~%~ For the current track, the high frequency setting cannot~%~ - be greater than ~a Hz" + be greater than ~a Hz") p-err (/ *sound-srate* 2)))) ((and bw (= bw 0)) (throw 'error-message - (format nil "~aBandwidth is zero (the upper and lower~%~ + (format nil (_"~aBandwidth is zero (the upper and lower~%~ frequencies are both ~a Hz).~%~ - Please select a frequency range." + Please select a frequency range.") p-err f0))) ;; If centre frequency band is above Nyquist, do nothing. ((and fc (>= fc (/ *sound-srate* 2.0))) @@ -59,7 +59,7 @@ (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*))) diff --git a/plug-ins/SpectralEditShelves.ny b/plug-ins/SpectralEditShelves.ny index cde754cfa..1faceb616 100644 --- a/plug-ins/SpectralEditShelves.ny +++ b/plug-ins/SpectralEditShelves.ny @@ -2,11 +2,11 @@ ;version 4 ;type process spectral ;preview linear -;name "Spectral edit shelves..." +$name (_"Spectral edit shelves") ;manpage "Spectral_edit_shelves" -;action "Filtering..." -;author "Paul Licameli" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Filtering...") +$author (_"Paul Licameli") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; SpectralEditShelves.ny by Paul Licameli, November 2014. @@ -14,7 +14,7 @@ ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -;control control-gain "Gain (dB)" real "" 0 -24 24 +$control control-gain (_"Gain (dB)") real "" 0 -24 24 (defmacro validate (hz) "If frequency is above Nyquist, don't use it" @@ -49,15 +49,15 @@ (env (snd-pwl 0.0 rate breakpoints))) (cond ((not (or f0 f1)) ; This should never happen for a 'spectral' effect. - (throw 'error-message (format nil "~aPlease select frequencies." p-err))) + (throw 'error-message (format nil (_"~aPlease select frequencies.") p-err))) ((and f0 (>= f0 (/ *sound-srate* 2.0))) ; Shelf is above Nyquist frequency so do nothing. nil) ((and f0 f1 (= f0 f1)) (throw 'error-message - (format nil "~aBandwidth is zero (the upper and lower~%~ + (format nil (_"~aBandwidth is zero (the upper and lower~%~ frequencies are both ~a Hz).~%~ - Please select a frequency range." + Please select a frequency range.") p-err f0))) (T (if f0 (validate f0)) (if f1 (validate f1)) @@ -67,7 +67,7 @@ (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*))) diff --git a/plug-ins/StudioFadeOut.ny b/plug-ins/StudioFadeOut.ny index 73570393c..5e7d5304b 100644 --- a/plug-ins/StudioFadeOut.ny +++ b/plug-ins/StudioFadeOut.ny @@ -2,11 +2,11 @@ ;version 1 ;type process ;categories "http://lv2plug.in/ns/lv2core#MixerPlugin" -;name "Studio Fade Out" +$name (_"Studio Fade Out") ;manpage "Fades#studio_fadeout" -;action "Applying Fade..." -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Applying Fade...") +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; StudioFadeOut.ny by Steve Daulton December 2012. ;; Released under terms of the GNU General Public License version 2: @@ -39,7 +39,7 @@ (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))))) - \ No newline at end of file + diff --git a/plug-ins/adjustable-fade.ny b/plug-ins/adjustable-fade.ny index a0c1f985f..ee218bc77 100644 --- a/plug-ins/adjustable-fade.ny +++ b/plug-ins/adjustable-fade.ny @@ -4,12 +4,12 @@ ;preview linear ;preview selection ;categories "http://lv2plug.in/ns/lv2core#MixerPlugin" -;name "Adjustable Fade..." +$name (_"Adjustable Fade") ;manpage "Adjustable_Fade" ;debugbutton false -;action "Applying Fade..." -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Applying Fade...") +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; adjustable-fade.ny by Steve Daulton Dec 2012 ;; Released under terms of the GNU General Public License version 2: @@ -18,12 +18,21 @@ ;; For information about writing and modifying Nyquist plug-ins: ;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference -;control type "Fade Type" choice "Fade Up,Fade Down,S-Curve Up,S-Curve Down" 0 -;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 "None Selected,Linear In,Linear Out,Exponential In,Exponential Out,Logarithmic In,Logarithmic Out,Rounded In,Rounded Out,Cosine In,Cosine Out,S-Curve In,S-Curve Out" 0 +$control type (_"Fade Type") choice ((_"Fade Up") (_"Fade Down") (_"S-Curve Up") (_"S-Curve Down")) 0 +$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 +(override controls)") choice ( + (_"None Selected") + (_"Linear In") (_"Linear Out") + (_"Exponential In") (_"Exponential Out") + (_"Logarithmic In") (_"Logarithmic Out") + (_"Rounded In") (_"Rounded Out") + (_"Cosine In") (_"Cosine Out") + (_"S-Curve In") (_"S-Curve Out") + ) 0 (defun get-input (sig) @@ -45,14 +54,14 @@ selection length, but preview only needs to process preview length." (if (= units 0) ;percentage values (cond ((or (< x 0)(< y 0)) - (throw 'err (format nil "~aPercentage values cannot be negative." err))) + (throw 'err (format nil (_"~aPercentage values cannot be negative.") err))) ((or (> x 1000)(> y 1000)) - (throw 'err (format nil "~aPercentage values cannot be more than 1000 %." err)))) + (throw 'err (format nil (_"~aPercentage values cannot be more than 1000 %.") err)))) (cond ;dB values ((or (> x 100)(> y 100)) - (throw 'err (format nil "~adB values cannot be more than +100 dB.~%~%~ + (throw 'err (format nil (_"~adB values cannot be more than +100 dB.~%~%~ Hint: 6 dB doubles the amplitude~%~ - \t-6 dB halves the amplitude." err)))))) + \t-6 dB halves the amplitude." err))))))) ;;; select and apply fade (defun fade (sig type curve g0 g1) @@ -184,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)) diff --git a/plug-ins/beat.ny b/plug-ins/beat.ny index ae9093aa0..f0a6860d3 100644 --- a/plug-ins/beat.ny +++ b/plug-ins/beat.ny @@ -2,22 +2,23 @@ ;version 1 ;type analyze ;categories "https://audacityteam.org/namespace#OnsetDetector" -;name "Beat Finder..." +$name (_"Beat Finder") ;manpage "Beat_Finder" -;action "Finding beats..." -;author "Audacity" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Finding beats...") +$author (_"Audacity") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -;control thresval "Threshold Percentage" int "" 65 5 100 +$control thresval (_"Threshold Percentage") int "" 65 5 100 (setf s1 (if (arrayp s) (snd-add (aref s 0) (aref s 1)) s)) (defun signal () (force-srate 1000 (lp (snd-follow (lp s1 50) 0.001 0.01 0.1 512) 10))) (setq max (peak (signal) NY:ALL)) (setq thres (* (/ thresval 100.0) max)) (setq s2 (signal)) (do ((c 0.0) (l NIL) (p T) (v (snd-fetch s2))) ((not v) l) +; "B" seems too short to put into the i18n catalog. Make it a control? (if (and p (> v thres)) (setq l (cons (list c "B") l))) (setq p (< v thres)) (setq c (+ c 0.001)) diff --git a/plug-ins/clipfix.ny b/plug-ins/clipfix.ny index a341c0b70..27ace4245 100644 --- a/plug-ins/clipfix.ny +++ b/plug-ins/clipfix.ny @@ -2,11 +2,11 @@ ;version 4 ;type process ;preview enabled -;name "Clip Fix..." +$name (_"Clip Fix") ;manpage "Clip_Fix" -;action "Reconstructing clips..." -;author "Benjamin Schwartz and Steve Daulton" -;copyright "Licensing confirmed under terms of the GNU General Public License version 2" +$action (_"Reconstructing clips...") +$author (_"Benjamin Schwartz and Steve Daulton") +$copyright (_"Licensing confirmed under terms of the GNU General Public License version 2") ;; Algorithm by Benjamin Schwartz ;; Clip Fix is a simple, stupid (but not blind) digital-clipping-corrector @@ -16,8 +16,8 @@ ;; 3. Do a cubic spline interpolation. ;; 4. Go to next region -;control threshold "Threshold of Clipping (%)" float "" 95 0 100 -;control gain "Reduce amplitude to allow for restored peaks (dB)" float "" -9 -30 0 +$control threshold (_"Threshold of Clipping (%)") float "" 95 0 100 +$control gain (_"Reduce amplitude to allow for restored peaks (dB)") float "" -9 -30 0 (setf threshold (/ threshold 100)) (setf gain (db-to-linear gain)) diff --git a/plug-ins/crossfadeclips.ny b/plug-ins/crossfadeclips.ny index f0c82bfa0..e326bc590 100644 --- a/plug-ins/crossfadeclips.ny +++ b/plug-ins/crossfadeclips.ny @@ -3,11 +3,11 @@ ;type process ;mergeclips 1 ;restoresplits 0 -;name "Crossfade Clips" +$name (_"Crossfade Clips") ;manpage "Crossfade_Clips" -;action "Crossfading..." -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Crossfading...") +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; crossfadeclips.ny by Steve Daulton Dec 2014. @@ -37,8 +37,8 @@ ;; 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 @@ (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."))) diff --git a/plug-ins/crossfadetracks.ny b/plug-ins/crossfadetracks.ny index 4567e8d55..1709cc5b0 100644 --- a/plug-ins/crossfadetracks.ny +++ b/plug-ins/crossfadetracks.ny @@ -1,21 +1,21 @@ ;nyquist plug-in ;version 4 ;type process -;name "Crossfade Tracks..." +$name (_"Crossfade Tracks") ;manpage "Crossfade_Tracks" ;debugbutton disabled -;action "Crossfading..." +$action (_"Crossfading...") ;preview selection -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; crossfadetracks.ny by Steve Daulton Nov 2014 / Sep 2015 ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control type "Fade type" choice "Constant Gain,Constant Power 1,Constant Power 2,Custom Curve" 0 -;control curve "Custom curve" real "" 0 0 1 -;control direction "Fade direction" choice "Automatic,Alternating Out / In,Alternating In / Out" 0 +$control type (_"Fade type") choice ((_"Constant Gain") (_"Constant Power 1") (_"Constant Power 2") (_"Custom Curve")) 0 +$control curve (_"Custom curve") real "" 0 0 1 +$control direction (_"Fade direction") choice ((_"Automatic") (_"Alternating Out / In") (_"Alternating In / Out")) 0 (defun crossfade (type dir curve) @@ -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)) diff --git a/plug-ins/delay.ny b/plug-ins/delay.ny index 60f620c36..93c8c13e2 100644 --- a/plug-ins/delay.ny +++ b/plug-ins/delay.ny @@ -3,11 +3,11 @@ ;type process ;preview linear ;categories "http://lv2plug.in/ns/lv2core#DelayPlugin" -;name "Delay..." +$name (_"Delay") ;manpage "Delay" -;action "Applying Delay Effect..." -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Applying Delay Effect...") +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; by Steve Daulton, July 2012. ;; based on 'Delay' by David R. Sky @@ -17,13 +17,13 @@ ;; For information about writing and modifying Nyquist plug-ins: ;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference -;control delay-type "Delay type" choice "regular,bouncing ball,reverse bouncing ball" 0 -;control dgain "Delay level per echo (dB)" real "" -6 -30 1 -;control delay "Delay time (seconds)" real "" 0.3 0 5 -;control pitch-type "Pitch change effect" choice "Pitch/Tempo,LQ Pitch Shift" 0 -;control shift "Pitch change per echo (semitones)" real "" 0 -2 2 -;control number "Number of echoes" int "" 5 1 30 -;control constrain "Allow duration to change" choice "Yes,No" 0 +$control delay-type (_"Delay type") choice ((_"regular") (_"bouncing ball") (_"reverse bouncing ball")) 0 +$control dgain (_"Delay level per echo (dB)") real "" -6 -30 1 +$control delay (_"Delay time (seconds)") real "" 0.3 0 5 +$control pitch-type (_"Pitch change effect") choice ((_"Pitch/Tempo") (_"LQ Pitch Shift")) 0 +$control shift (_"Pitch change per echo (semitones)") real "" 0 -2 2 +$control number (_"Number of echoes") int "" 5 1 30 +$control constrain (_"Allow duration to change") choice ((_"Yes") (_"No")) 0 ;; The default pitch shift effect is a simple resampling, @@ -42,19 +42,19 @@ T nil)) (when (err-chk number 1 50)(setq err (format nil - "Number of echoes '~a' outside valid range 1 to 50.~%~a" + (_"Number of echoes '~a' outside valid range 1 to 50.~%~a") number err))) (when (err-chk shift -12 12)(setq err (format nil - "Pitch change '~a' outside valid range -12 to +12 semitones.~%~a" + (_"Pitch change '~a' outside valid range -12 to +12 semitones.~%~a") shift err))) (when (err-chk delay 0 10)(setq err (format nil - "Delay time '~a' outside valid range 0 to 10 seconds.~%~a" + (_"Delay time '~a' outside valid range 0 to 10 seconds.~%~a") delay err))) (when (err-chk dgain -30 6)(setq err (format nil - "Delay level '~a' outside valid range -30 to +6 dB.~%~a" + (_"Delay level '~a' outside valid range -30 to +6 dB.~%~a") dgain err))) @@ -121,7 +121,7 @@ ;;; return errors or process (if (> (length err) 0) - (format nil "Error.~%~a" err) ; return error + (format nil (_"Error.~%~a") err) ; return error (let* ((delay (if (= delay-type 0) delay (/ delay number))) (output (multichan-expand #'delays diff --git a/plug-ins/equalabel.ny b/plug-ins/equalabel.ny index dcc67a259..cbf43f6b3 100644 --- a/plug-ins/equalabel.ny +++ b/plug-ins/equalabel.ny @@ -1,11 +1,11 @@ ;nyquist plug-in ;version 4 ;type analyze -;name "Regular Interval Labels..." +$name (_"Regular Interval Labels") ;manpage "Regular_Interval_Labels" -;action "Adding equally-spaced labels to the label track..." -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Adding equally-spaced labels to the label track...") +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html @@ -15,13 +15,17 @@ ;; Alex S.Brown, Dominic Mazzoni, Pierre M.I., Gale Andrews, Steve Daulton. ;; This version by Steve Daulton (http://easyspacepro.com) 2016 -;control mode "Use 'Number of labels' OR 'Label interval'" choice "Number of labels,Label interval" 0 -;control totalnum "Number of labels" int-text "" 10 1 1000 -;control interval "Label interval (seconds)" float-text "" 60 0.001 3600 -;control adjust "Adjust label interval to fit length" choice "No,Yes" 0 -;control labeltext "Label text" string "" "Label" "" -;control zeros "Minimum number of digits in label" choice "None - text only,1 (before label),2 (before label),3 (before label),1 (after label),2 (after label),3 (after label)" 2 -;control firstnum "Begin numbering from" int-text "" 1 0 nil +$control mode (_"Use 'Number of labels' OR 'Label interval'") choice ((_"Number of labels") (_"Label interval")) 0 +$control totalnum (_"Number of labels") int-text "" 10 1 1000 +$control interval (_"Label interval (seconds)") float-text "" 60 0.001 3600 +$control adjust (_"Adjust label interval to fit length") choice ((_"No") (_"Yes")) 0 +$control labeltext (_"Label text") string "" (_"Label") +$control zeros (_"Minimum number of digits in label") choice ( + (_"None - text only") + (_"1 (before label)") (_"2 (before label)") (_"3 (before label)") + (_"1 (after label)") (_"2 (after label)") (_"3 (after label)") +) 2 +$control firstnum (_"Begin numbering from") int-text "" 1 0 nil (defun make-labels () @@ -45,12 +49,12 @@ "Throw error if excessive number of labels ('Interval' mode only)" (when (> totalnum 1000) (throw 'err - (format nil "Too many labels.~%~%~ + (format nil ("Too many labels.~%~%~ Selection length is ~a seconds and~%~ Label interval is ~a seconds~%~ giving a total of ~a labels.~%~ Maximum number of labels from this effect is 1000.~%~ - Please use a shorter selection, or a longer Label interval." + Please use a shorter selection, or a longer Label interval.") (formatgg (get-duration 1)) (formatgg interval) (if (= adjust 1) diff --git a/plug-ins/highpass.ny b/plug-ins/highpass.ny index e5642b31b..7b3716d55 100644 --- a/plug-ins/highpass.ny +++ b/plug-ins/highpass.ny @@ -2,12 +2,12 @@ ;version 4 ;type process ;preview linear -;name "High Pass Filter..." +$name (_"High Pass Filter") ;manpage "High_Pass_Filter" ;debugbutton disabled -;action "Performing High Pass Filter..." -;author "Dominic Mazzoni" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Performing High Pass Filter...") +$author (_"Dominic Mazzoni") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; highpass.ny by Dominic Mazzoni ;; Last updated August 2015 @@ -15,16 +15,16 @@ ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control frequency "Frequency (Hz)" float-text "" 1000 0 nil -;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0 +$control frequency (_"Frequency (Hz)") float-text "" 1000 0 nil +$control rolloff (_"Rolloff (dB per octave)") choice ((_"6 dB") (_"12 dB") (_"24 dB") (_"36 dB") (_"48 dB")) 0 (cond - ((< frequency 0.1) "Frequency must be at least 0.1 Hz.") + ((< frequency 0.1) (_"Frequency must be at least 0.1 Hz.")) ((>= frequency (/ *sound-srate* 2.0)) - (format nil "Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ + (format nil (_"Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ Track sample rate is ~a Hz~%~ - Frequency must be less than ~a Hz." + Frequency must be less than ~a Hz.") frequency *sound-srate* (/ *sound-srate* 2.0))) diff --git a/plug-ins/limiter.ny b/plug-ins/limiter.ny index 0b0f41f5d..c27a67ac0 100644 --- a/plug-ins/limiter.ny +++ b/plug-ins/limiter.ny @@ -2,13 +2,13 @@ ;version 4 ;type process ;categories "http://lv2plug.in/ns/lv2core/#DynamicsPlugin" -;name "Limiter..." +$name (_"Limiter") ;manpage "Limiter" ;debugbutton false -;action "Limiting..." +$action (_"Limiting...") ;preview enabled -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; limiter.ny by Steve Daulton November 2011, updated May 2015. ;; Released under terms of the GNU General Public License version 2: @@ -17,12 +17,14 @@ ;; For information about writing and modifying Nyquist plug-ins: ;; 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 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 +$control type (_"Type") choice ((_"Soft Limit") (_"Hard Limit") (_"Soft Clip") (_"Hard Clip")) 0 +$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 (if (not (boundp 'type)) (setf type 0)) diff --git a/plug-ins/lowpass.ny b/plug-ins/lowpass.ny index a2b8cd59a..4edde62d4 100644 --- a/plug-ins/lowpass.ny +++ b/plug-ins/lowpass.ny @@ -2,12 +2,12 @@ ;version 4 ;type process ;preview linear -;name "Low Pass Filter..." +$name (_"Low Pass Filter") ;manpage "Low_Pass_Filter" ;debugbutton disabled -;action "Performing Low Pass Filter..." -;author "Dominic Mazzoni" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Performing Low Pass Filter...") +$author (_"Dominic Mazzoni") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; lowpass.ny by Dominic Mazzoni ;; Last updated August 2015 @@ -15,16 +15,16 @@ ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control frequency "Frequency (Hz)" float-text "" 1000 0 nil -;control rolloff "Rolloff (dB per octave)" choice " 6 dB,12 dB,24 dB,36 dB,48 dB" 0 +$control frequency (_"Frequency (Hz)") float-text "" 1000 0 nil +$control rolloff (_"Rolloff (dB per octave)") choice ((_"6 dB") (_"12 dB") (_"24 dB") (_"36 dB") (_"48 dB")) 0 (cond - ((< frequency 0.1) "Frequency must be at least 0.1 Hz.") + ((< frequency 0.1) (_"Frequency must be at least 0.1 Hz.")) ((>= frequency (/ *sound-srate* 2.0)) - (format nil "Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ + (format nil (_"Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ Track sample rate is ~a Hz~%~ - Frequency must be less than ~a Hz." + Frequency must be less than ~a Hz.") frequency *sound-srate* (/ *sound-srate* 2.0))) diff --git a/plug-ins/notch.ny b/plug-ins/notch.ny index b6d011621..a974b212f 100644 --- a/plug-ins/notch.ny +++ b/plug-ins/notch.ny @@ -2,27 +2,27 @@ ;version 4 ;type process ;preview linear -;name "Notch Filter..." +$name (_"Notch Filter") ;manpage "Notch_Filter" ;debugbutton false -;action "Applying Notch Filter..." -;author "Steve Daulton and Bill Wharrie" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Applying Notch Filter...") +$author (_"Steve Daulton and Bill Wharrie") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; notch.ny by Steve Daulton and Bill Wharrie ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control frequency "Frequency (Hz)" float-text "" 60 0 nil -;control q "Q (higher value reduces width)" float-text "" 1 0.1 1000 +$control frequency (_"Frequency (Hz)") float-text "" 60 0 nil +$control q (_"Q (higher value reduces width)") float-text "" 1 0.1 1000 (cond - ((< frequency 0.1) "Frequency must be at least 0.1 Hz.") + ((< frequency 0.1) (_"Frequency must be at least 0.1 Hz.")) ((>= frequency (/ *sound-srate* 2.0)) - (format nil "Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ + (format nil (_"Error:~%~%Frequency (~a Hz) is too high for track sample rate.~%~%~ Track sample rate is ~a Hz.~%~ - Frequency must be less than ~a Hz." + Frequency must be less than ~a Hz.") frequency *sound-srate* (/ *sound-srate* 2.0))) diff --git a/plug-ins/pluck.ny b/plug-ins/pluck.ny index 23a1429c1..f1e9f6805 100644 --- a/plug-ins/pluck.ny +++ b/plug-ins/pluck.ny @@ -2,21 +2,21 @@ ;version 4 ;type generate ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" -;name "Pluck..." +$name (_"Pluck") ;manpage "Pluck" ;debugbutton false ;preview linear -;action "Generating pluck sound..." -;info "MIDI values for C notes: 36, 48, 60 [middle C], 72, 84, 96." -;author "David R.Sky" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Generating pluck sound...") +$info (_"MIDI values for C notes: 36, 48, 60 [middle C], 72, 84, 96.") +$author (_"David R.Sky") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control pitch "Pluck MIDI pitch" int "" 60 1 120 -;control fade "Fade-out type" choice "abrupt,gradual" 0 -;control dur "Duration [seconds]" real "" 1 0.1 30 +$control pitch (_"Pluck MIDI pitch") int "" 60 1 120 +$control fade (_"Fade-out type") choice ((_"abrupt") (_"gradual")) 0 +$control dur (_"Duration [seconds]") real "" 1 0.1 30 ; original pluck.ny modified by David R.Sky October 2007 ; [vastly simplified later] diff --git a/plug-ins/rhythmtrack.ny b/plug-ins/rhythmtrack.ny index c98323f15..d93f43366 100644 --- a/plug-ins/rhythmtrack.ny +++ b/plug-ins/rhythmtrack.ny @@ -2,12 +2,12 @@ ;version 4 ;type generate ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" -;name "Rhythm Track..." +$name (_"Rhythm Track") ;manpage "Rhythm_Track" ;preview linear -;action "Generating Rhythm..." -;author "Dominic Mazzoni" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Generating Rhythm...") +$author (_"Dominic Mazzoni") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; by Dominic Mazzoni, David R. Sky and Steve Daulton. ;; Drip sound generator by Paul Beach @@ -15,22 +15,24 @@ ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . -;control action "Action choice" choice "Generate track, Help screen 1, Help screen 2" 0 -;control tempo "Tempo (beats per minute)" real "30 - 300 beats/minute" 120 30 300 -;control timesig "Beats per measure (bar)" int "1 - 20 beats/measure" 4 1 20 -;control swing "Swing amount" float "+/- 1" 0 -1 1 -;control measures "Number of measures (bars)" int "1 - 1000 bars" 16 1 1000 -;control click-track-dur "Optional rhythm track duration (minutes seconds)" string "Whole numbers only" "" +$control action (_"Action choice") choice ((_"Generate track") (_"Help screen 1") (_"Help screen 2")) 0 +$control tempo (_"Tempo (beats per minute)") real (_"30 - 300 beats/minute") 120 30 300 +$control timesig (_"Beats per measure (bar)") int (_"1 - 20 beats/measure") 4 1 20 +$control swing (_"Swing amount") float (_"+/- 1") 0 -1 1 +$control measures (_"Number of measures (bars)") int (_"1 - 1000 bars") 16 1 1000 +$control click-track-dur (_"Optional rhythm track duration (minutes seconds)") string (_"Whole numbers only") "" ;;control ticklen "Individual beat duration (milliseconds)" int "1 - 100 ms" 10 1 100 -;control offset "Start time offset (seconds)" real "0 - 30 seconds" 0 0 30 -;control click-type "Beat sound" choice "Metronome tick,Ping,Cowbell,Resonant noise,Noise click,Drip" 0 +$control offset (_"Start time offset (seconds)") real (_"0 - 30 seconds") 0 0 30 +$control click-type (_"Beat sound") choice ( + (_"Metronome tick") (_"Ping") (_"Cowbell") (_"Resonant noise") (_"Noise click") (_"Drip") +) 0 ;;control q "Noise click resonance - discernable pitch (q)" int "1 - 20" 1 1 20 -;control high "MIDI pitch of strong beat" int "18 - 116" 84 18 116 -;control low "MIDI pitch of weak beat" int "18 - 116" 80 18 116 +$control high (_"MIDI pitch of strong beat") int (_"18 - 116") 84 18 116 +$control low (_"MIDI pitch of weak beat") int (_"18 - 116") 80 18 116 ;; allow q control to be commented out. (if (not (boundp 'q)) @@ -46,7 +48,7 @@ (defun help1 () (format nil -"Rhythm Track Generator help - screen 1 of 2 +(_"Rhythm Track Generator help - screen 1 of 2 Generates a rhythm track at the selected tempo, beats per measure, and either number of measures or track duration, @@ -73,12 +75,12 @@ If you enter a value into this field, the 'number of measures' value will be ignored. To generate rhythm track or view help screen 2, -restart Rhythm Track and select from 'Action choice'.")) ;end of help1 +restart Rhythm Track and select from 'Action choice'."))) ;end of help1 (defun help2 () (format nil -"Rhythm Track Generator help - screen 2 of 2 +(_"Rhythm Track Generator help - screen 2 of 2 'Start time offset': makes the rhythm track start at a later time than the very beginning (zero seconds), maximum @@ -93,7 +95,7 @@ what pitch to use. C-notes are: C# (C-sharp) above middle C is 61. To generate rhythm track or view help screen 1, -restart Rhythm Track and select from 'Action choice'.")) ;end of help 2 +restart Rhythm Track and select from 'Action choice'."))) ;end of help 2 ;Check function: returns 1 on error @@ -154,44 +156,44 @@ restart Rhythm Track and select from 'Action choice'.")) ;end of help 2 ; tempo (if (= (check tempo 30 300) 1) (setq error-msg (strcat error-msg (format nil -"Tempo ~a outside valid range 30 to 300 bpm -" tempo)))) +(_"Tempo ~a outside valid range 30 to 300 bpm +") tempo)))) ;beats per measure (if (= (check timesig 1 20) 1) (setq error-msg (strcat error-msg (format nil -"Beats per measure ~a outside valid range 1 to 20 -" timesig)))) +(_"Beats per measure ~a outside valid range 1 to 20 +") timesig)))) ;number of measures (if (= (check measures 1 1000) 1) (setq error-msg (strcat error-msg (format nil -"Number of measures ~a outside valid range 1 to 1000 -" measures)))) +(_"Number of measures ~a outside valid range 1 to 1000 +") measures)))) ;time start offset (if (= (check offset 0 30) 1) (setq error-msg (strcat error-msg (format nil -"Time offset ~a outside valid range 0 to 30 seconds -" offset)))) +(_"Time offset ~a outside valid range 0 to 30 seconds +") offset)))) ; q (if (= (check q 1 20) 1) (setq error-msg (strcat error-msg (format nil -"Filter quality q ~a outside valid range 1 to 20 -" q)))) +(_"Filter quality q ~a outside valid range 1 to 20 +") q)))) ;high MIDI pitch (if (= (check high 18 116) 1) (setq error-msg (strcat error-msg (format nil -"High MIDI pitch ~a outside valid range 18 to 116 -" high)))) +(_"High MIDI pitch ~a outside valid range 18 to 116 +") high)))) ;low MIDI pitch (if (= (check low 18 116) 1) (setq error-msg (strcat error-msg (format nil -"Low MIDI pitch ~a outside valid range 18 to 116 -" low)))) +(_"Low MIDI pitch ~a outside valid range 18 to 116 +") low)))) ;validate string (if (> (length m-s) 0) ;if at least one item @@ -201,16 +203,16 @@ restart Rhythm Track and select from 'Action choice'.")) ;end of help 2 (not (integerp (first m-s))) ;first is not an integer or (and (= (length m-s) 2)(not (integerp (second m-s))))) ;second is not an integer (setq error-msg (strcat error-msg (format nil -"If used, 'Optional rhythm track duration' must be +(_"If used, 'Optional rhythm track duration' must be entered as either one number (seconds0, or two numbers (minutes seconds) separated by a space. -Use whole numbers only.~%")))) +Use whole numbers only.~%"))))) ;one or two integers ((and (= (length m-s) 1) ;one integer and (= (check (first m-s) 0 3660) 1)) ;outside valid range (setq error-msg (strcat error-msg (format nil -"~a seconds is outside valid range 0 to 3660~%" (first m-s))))) +(_"~a seconds is outside valid range 0 to 3660~%") (first m-s))))) ;one or two integers ((and (= (length m-s) 2) ;2 integers and @@ -218,7 +220,7 @@ Use whole numbers only.~%")))) (= (check (first m-s) 0 60) 1) ;1st is outside valid range or (= (check (second m-s) 0 59) 1))) ;2nd is outside valid range or (setq error-msg (strcat error-msg (format nil -"~a is outside valid range 0 to (60 59)~%" +(_"~a is outside valid range 0 to (60 59)~%") m-s))))))) ;end of error checking (defun metronome-tick (hz peak) @@ -364,4 +366,4 @@ Use whole numbers only.~%")))) (make-click-track measures (* timesig beatlen)))) ;click track ;Else error message (setq error-msg (strcat (format nil -"Error.~%You have entered at least one invalid value:~%~%") error-msg))))) +(_"Error.~%You have entered at least one invalid value:~%~%")) error-msg))))) diff --git a/plug-ins/rissetdrum.ny b/plug-ins/rissetdrum.ny index 1f3287025..2b878317a 100644 --- a/plug-ins/rissetdrum.ny +++ b/plug-ins/rissetdrum.ny @@ -3,11 +3,12 @@ ;type generate ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" ;preview linear -;name "Risset Drum..." +;i18n-hint named for Jean-Claude Risset (silent t) +$name (_"Risset Drum") ;manpage "Risset_Drum" -;action "Generating Risset Drum..." -;author "Steven Jones" -;copyright "Released under terms of the GNU General Public License version 2" +$action (_"Generating Risset Drum...") +$author (_"Steven Jones") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; rissetdrum.ny by Steven Jones, after Jean Claude Risset. ;; Updated by Steve Daulton July 2012 and May 2015. @@ -17,12 +18,12 @@ ;; For information about writing and modifying Nyquist plug-ins: ;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference -;control freq "Frequency (Hz)" real "" 100 50 2000 -;control decay "Decay (seconds)" real "" 2 0.1 60 -;control cf "Center frequency of noise (Hz)" real "" 500 100 5000 -;control bw "Width of noise band (Hz)" real "" 400 10 1000 -;control noise "Amount of noise in mix (percent)" real "" 25 0 100 -;control gain "Amplitude (0 - 1)" real "" 0.8 0 1 +$control freq (_"Frequency (Hz)") real "" 100 50 2000 +$control decay (_"Decay (seconds)") real "" 2 0.1 60 +$control cf (_"Center frequency of noise (Hz)") real "" 500 100 5000 +$control bw (_"Width of noise band (Hz)") real "" 400 10 1000 +$control noise (_"Amount of noise in mix (percent)") real "" 25 0 100 +$control gain (_"Amplitude (0 - 1)") real "" 0.8 0 1 (defun sanitise (val minx maxx) diff --git a/plug-ins/sample-data-export.ny b/plug-ins/sample-data-export.ny index 6626c5506..78a44ccaa 100644 --- a/plug-ins/sample-data-export.ny +++ b/plug-ins/sample-data-export.ny @@ -1,13 +1,13 @@ ;nyquist plug-in ;version 3 ;type analyze -;name "Sample Data Export..." +$name (_"Sample Data Export") ;manpage "Sample_Data_Export" -;action "Analyzing..." +$action (_"Analyzing...") ;maxlen 1000001 ;categories "http://lv2plug.in/ns/lv2core#AnalyserPlugin" -;author "Steve Daulton" -;copyright "Released under terms of the GNU General Public License version 2" +$author (_"Steve Daulton") +$copyright (_"Released under terms of the GNU General Public License version 2") ;; sample-data-export.ny by Steve Daulton June 2012. ;; Updated July 16 2012. @@ -17,16 +17,35 @@ ;; For information about writing and modifying Nyquist plug-ins: ;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference -;control number "Limit output to first" string "samples" "100" -;control units "Measurement scale" choice "dB,Linear" 0 -;control fileformat "File data format" choice "Sample List (txt),Indexed List (txt),Time Indexed (txt),Data (csv),Web Page (html)" 0 -;control header "Include header information" choice "None,Minimal,Standard,All" 2 -;control optext "Optional header text" string "" -;control chan "Channel layout for stereo" choice "L-R on Same Line,Alternate Lines,L Channel First" 0 -;control messages "Show messages" choice "Yes,Errors Only,None" 0 -;control filename "File name" string "" "sample-data" -;control path "Output folder" string "" "Home directory" -;control owrite "Allow files to be overwritten" choice "No,Yes" 0 +$control number (_"Limit output to first") string (_"samples") "100" +$control units (_"Measurement scale") choice ((_"dB") (_"Linear")) 0 +$control fileformat (_"File data format") choice ( + (_"Sample List (txt)") + (_"Indexed List (txt)") + (_"Time Indexed (txt)") + (_"Data (csv)") + (_"Web Page (html)") +) 0 +$control header (_"Include header information") choice ( + (_"None") + (_"Minimal") + (_"Standard") + (_"All") +) 2 +$control optext (_"Optional header text") string "" +$control chan (_"Channel layout for stereo") choice ( + (_"L-R on Same Line") + (_"Alternate Lines") + (_"L Channel First") +) 0 +$control messages (_"Show messages") choice ( + (_"Yes") + (_"Errors Only") + (_"None") +) 0 +$control filename (_"File name") string "" (_"sample-data") +$control path (_"Output folder") string "" (_"Home directory") +$control owrite (_"Allow files to be overwritten") choice ((_"No") (_"Yes")) 0 ;; To enable L/R prefix before alternate L/R channels @@ -36,7 +55,7 @@ (when (not (boundp 'LR-prefix))(setq LR-prefix nil)) -(setq default-filename "sample-data") ; default filename +(setq default-filename (_"sample-data")) ; default filename (setq err "") ; initialise error mesaage (setq *float-format* "%1.5f") ; 5 decimal places @@ -90,9 +109,9 @@ (defun checknumber () (setq number (min number len)) (if (< number 1) - (add-error "No samples selected.")) + (add-error (_"No samples selected."))) (if (> number 1000000) - (add-error "Cannot export more than 1 million samples.")) + (add-error (_"Cannot export more than 1 million samples."))) (setq number (truncate number))) @@ -112,7 +131,8 @@ (setf ln10over20 (/ (log 10.0) 20)) (defun lin-to-db (val) (if (= val 0) - "[-inf]" + ;i18n-hint abbreviates negative infinity + (_"[-inf]") (/ (log val) ln10over20))) @@ -195,15 +215,15 @@ (if (and (arrayp s)(= chan 2)) (progn (unless (= header 0) ; Don't print 'channel' if no header - (format fp "Left Channel.~%~%")) + (format fp (_"Left Channel.~%~%"))) (print-text (aref s 0)) (if (= header 0) ; Don't print 'channel' if no header (format fp "~%") - (format fp "~%~%Right Channel.~%~%")) + (format fp (_"~%~%Right Channel.~%~%"))) (print-text (aref s 1)) (close fp) (if (= messages 0) - (format nil "~aData written to:~%~a~a~a" + (format nil (_"~aData written to:~%~a~a~a") (normhead) path fileseparator filename) nil)) ;; mono or alternate @@ -211,7 +231,7 @@ (print-text s) (close fp) (if (= messages 0) - (format nil "~aData written to:~%~a~a~a" + (format nil (_"~aData written to:~%~a~a~a") (normhead) path fileseparator filename) nil)))) @@ -240,7 +260,7 @@ (if (string-equal path "~/" :end1 2) (setq path (strcat (home)(subseq path 1))))) ;; If path not set use home directory - (if (or (string-equal path "Home directory") + (if (or (string-equal path (_"Home directory")) (string-equal path "")) (setq path (home))) ;; if file name not set use default @@ -255,7 +275,7 @@ (string-equal path realdir))) ;; makefilename or error (setq filename (makefilename filename FileExt)) - (add-error (format nil "Output folder \"~a~a\" cannot be accessed." + (add-error (format nil (_"Output folder \"~a~a\" cannot be accessed.") path fileseparator)))) ;; check if file is writeable (when (= (length err) 0) @@ -263,7 +283,7 @@ (setq fp (open filename :direction :output)) ;check file is writeable (if (not fp) - (add-error (format nil "\"~a~a~a\" cannot be written." + (add-error (format nil (_"\"~a~a~a\" cannot be written.") path fileseparator filename))))) @@ -279,7 +299,7 @@ (defun minhead () (format nil -"Sample Rate: ~a Hz. Sample values on ~a scale.~%~a~%~a" +(_"Sample Rate: ~a Hz. Sample values on ~a scale.~%~a~%~a") (get 'info 'srate) ; sample rate (get 'info 'units) ; units (get 'info 'chan-order) ; Channel Order @@ -291,7 +311,7 @@ (defun normhead () (if (= fileformat 4) ; html (format nil -"~a ~a~%~aSample Rate: ~a Hz.~%Length processed: ~a samples ~a seconds.~a" +(_"~a ~a~%~aSample Rate: ~a Hz.~%Length processed: ~a samples ~a seconds.~a") filename ; file name (get 'info 'channels) ; mono/stereo (get 'info 'chan-order) ; Channel Order @@ -302,8 +322,8 @@ (format nil "~%~a~%~%~%" optext) ; optional text (format nil "~%~%~%"))) ; no optional text (format nil -"~a ~a~%~aSample Rate: ~a Hz. Sample values on ~a scale.~%~ -Length processed: ~a samples ~a seconds.~a" +(_"~a ~a~%~aSample Rate: ~a Hz. Sample values on ~a scale.~%~ +Length processed: ~a samples ~a seconds.~a") filename ; file name (get 'info 'channels) ; mono/stereo (get 'info 'chan-order) ; Channel Order @@ -318,9 +338,9 @@ Length processed: ~a samples ~a seconds.~a" (defun fullhead () (format nil -"~a~%Sample Rate: ~a Hz. Sample values on ~a scale. ~a.~%~aLength processed: ~a ~ +(_"~a~%Sample Rate: ~a Hz. Sample values on ~a scale. ~a.~%~aLength processed: ~a ~ samples, ~a seconds.~%Peak amplitude: ~a (lin) ~a dB. Unweighted RMS: ~a dB.~%~ -DC offset: ~a~a" +DC offset: ~a~a") filename ; file name (get 'info 'srate) ; sample rate (get 'info 'units) ; units @@ -333,9 +353,9 @@ DC offset: ~a~a" (srms s) ; rms (let ((vals (dc-off s))) ; DC offset (if (= (length vals) 2) ; mono - (format nil "~a linear, ~a dB." + (format nil (_"~a linear, ~a dB.") (first vals)(second vals)) - (format nil "Left: ~a lin, ~a dB | Right: ~a lin, ~a dB." + (format nil (_"Left: ~a lin, ~a dB | Right: ~a lin, ~a dB.") (first vals)(second vals)(third vals)(fourth vals)))) (if (> (length optext)0) (format nil "~%~a~%~%~%" optext) ; optional text @@ -346,7 +366,7 @@ DC offset: ~a~a" ;; HTML Output ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun html-head () +(defun html-head () (strcat "
@@ -427,26 +447,29 @@ ul { color: blue; } -