25
25
require_relative "../lib/sonicpi/lang/sound"
26
26
require_relative "../lib/sonicpi/lang/minecraftpi"
27
27
require_relative "../lib/sonicpi/lang/midi"
28
+ require_relative '../paths'
28
29
require 'active_support/inflector'
29
30
require 'erb'
30
31
require 'gettext'
31
32
require "gettext/tools/xgettext"
32
33
33
-
34
34
class QtDocs
35
35
include SonicPi ::Lang ::Support ::DocSystem
36
36
include SonicPi ::Util
@@ -72,9 +72,9 @@ def generate_docs
72
72
73
73
def generate_pot_file ( interpolated_file_paths )
74
74
puts 'Extracting the translatable text into pot file...'
75
- FileUtils . mkdir_p ( interpolated_template_path ) unless File . exist? ( interpolated_template_path )
75
+ FileUtils . mkdir_p ( :: SonicPi :: Paths . interpolated_template_path ) unless File . exist? ( :: SonicPi :: Paths . interpolated_template_path )
76
76
cwd = Dir . pwd
77
- Dir . chdir ( generated_path )
77
+ Dir . chdir ( :: SonicPi :: Paths . generated_path )
78
78
GetText ::Tools ::XGetText . run (
79
79
*interpolated_file_paths ,
80
80
'-otest.pot'
@@ -98,7 +98,7 @@ def generate_toml_files
98
98
99
99
def sync_to_documentation_app
100
100
puts 'Syncing the TOML files to the documentation web app...'
101
- FileUtils . cp_r ( doc_toml_path , documentation_app_priv_path , remove_destination : true )
101
+ FileUtils . cp_r ( :: SonicPi :: Paths . doc_toml_path , :: SonicPi :: Paths . documentation_app_priv_path , remove_destination : true )
102
102
end
103
103
104
104
def synths
@@ -107,9 +107,9 @@ def synths
107
107
end
108
108
{
109
109
items : items ,
110
- template_path : synth_and_fx_template_path ,
111
- interpolated_path : synths_interpolated_path ,
112
- output_path : synths_toml_path ,
110
+ template_path : :: SonicPi :: Paths . synth_and_fx_template_path ,
111
+ interpolated_path : :: SonicPi :: Paths . synths_interpolated_path ,
112
+ output_path : :: SonicPi :: Paths . synths_toml_path ,
113
113
klass : SonicPi ::Synths ::SynthInfo
114
114
}
115
115
end
@@ -120,29 +120,29 @@ def fx
120
120
end
121
121
{
122
122
items : items ,
123
- template_path : synth_and_fx_template_path ,
124
- interpolated_path : fx_interpolated_path ,
125
- output_path : fx_toml_path ,
123
+ template_path : :: SonicPi :: Paths . synth_and_fx_template_path ,
124
+ interpolated_path : :: SonicPi :: Paths . fx_interpolated_path ,
125
+ output_path : :: SonicPi :: Paths . fx_toml_path ,
126
126
klass : SonicPi ::Synths ::FXInfo
127
127
}
128
128
end
129
129
130
130
def samples
131
131
{
132
132
items : SonicPi ::Synths ::SynthInfo . grouped_samples ,
133
- template_path : samples_template_path ,
134
- interpolated_path : samples_interpolated_path ,
135
- output_path : samples_toml_path ,
133
+ template_path : :: SonicPi :: Paths . samples_template_path ,
134
+ interpolated_path : :: SonicPi :: Paths . samples_interpolated_path ,
135
+ output_path : :: SonicPi :: Paths . samples_toml_path ,
136
136
data_object : SonicPi ::Synths ::StereoPlayer . new
137
137
}
138
138
end
139
139
140
140
def lang
141
141
{
142
142
items : @@docs ,
143
- template_path : lang_template_path ,
144
- interpolated_path : lang_interpolated_path ,
145
- output_path : lang_toml_path
143
+ template_path : :: SonicPi :: Paths . lang_template_path ,
144
+ interpolated_path : :: SonicPi :: Paths . lang_interpolated_path ,
145
+ output_path : :: SonicPi :: Paths . lang_toml_path
146
146
}
147
147
end
148
148
end
0 commit comments