@@ -58,6 +58,10 @@ public void extract(
5858 {
5959 ConfigurationLoader configurationLoader = new ConfigurationLoader ();
6060 Configuration configuration = configurationLoader .loadOrGetDefault (configurationFilePath );
61+ if (StringUtils .isNotEmpty (baseUrl ))
62+ {
63+ configuration .setBaseUrl (baseUrl );
64+ }
6165 if (StringUtils .isNotEmpty (apiKey ))
6266 {
6367 configuration .setApiKey (apiKey );
@@ -109,12 +113,16 @@ public void upload(
109113 @ Option (names = {"--uploadFormat" }, description = "Translations or keys format" ) String uploadFormat ,
110114 @ Option (names = {"--uploadOptions" }, split = "," , description = "(Optional) Read more about 'uploadOptions' param at docs.simplelocalize.io" ) List <String > uploadOptions ,
111115 @ Option (names = {"--languageKey" }, description = "(Optional) Specify language key for single file upload" ) String languageKey ,
112- @ Option (names = {"--customerId" }, description = "Upload translations for given customerId" ) String customerId ,
116+ @ Option (names = {"--customerId" }, description = "(Optional) Upload translations for given customerId" ) String customerId ,
113117 @ Option (names = {"--baseUrl" }, description = "(Optional) Set custom server URL" ) String baseUrl
114118 ) throws IOException
115119 {
116120 ConfigurationLoader configurationLoader = new ConfigurationLoader ();
117121 Configuration configuration = configurationLoader .loadOrGetDefault (configurationFilePath );
122+ if (StringUtils .isNotEmpty (baseUrl ))
123+ {
124+ configuration .setBaseUrl (baseUrl );
125+ }
118126
119127 if (StringUtils .isNotEmpty (apiKey ))
120128 {
@@ -138,12 +146,7 @@ public void upload(
138146
139147 if (StringUtils .isNotEmpty (customerId ))
140148 {
141- configuration .setCustomerId (languageKey );
142- }
143-
144- if (StringUtils .isNotEmpty (baseUrl ))
145- {
146- configuration .setBaseUrl (baseUrl );
149+ configuration .setCustomerId (customerId );
147150 }
148151
149152 if (uploadOptions != null )
@@ -168,11 +171,15 @@ public void download(
168171 @ Option (names = {"--downloadOptions" }, split = "," , description = "(Optional) Download options" ) List <String > downloadOptions ,
169172 @ Option (names = {"--languageKey" }, description = "(Optional) Setup languageKey parameter to download file with only one language translations" ) String languageKey ,
170173 @ Option (names = {"--customerId" }, description = "(Optional) Download translations for given customerId" ) String customerId ,
171- @ Option (names = {"--baseUrl" }, description = "(Optional) Download translations for given customerId " ) String baseUrl
174+ @ Option (names = {"--baseUrl" }, description = "(Optional) Set custom server URL " ) String baseUrl
172175 )
173176 {
174177 ConfigurationLoader configurationLoader = new ConfigurationLoader ();
175178 Configuration configuration = configurationLoader .loadOrGetDefault (configurationFilePath );
179+ if (StringUtils .isNotEmpty (baseUrl ))
180+ {
181+ configuration .setBaseUrl (baseUrl );
182+ }
176183
177184 if (StringUtils .isNotEmpty (apiKey ))
178185 {
@@ -192,11 +199,7 @@ public void download(
192199 }
193200 if (StringUtils .isNotEmpty (customerId ))
194201 {
195- configuration .setCustomerId (languageKey );
196- }
197- if (StringUtils .isNotEmpty (baseUrl ))
198- {
199- configuration .setBaseUrl (baseUrl );
202+ configuration .setCustomerId (customerId );
200203 }
201204 if (downloadOptions != null )
202205 {
0 commit comments