@@ -279,6 +279,16 @@ const tarkovSpt = {
279279 }
280280 return tarkovSpt . locales ( { ...options , targetFile : localeFilename } ) . then ( locales => locales [ locale ] ) ;
281281 } ,
282+ localeOld : async ( locale , options = defaultOptions ) => {
283+ let localeFilename = locale ;
284+ for ( const sptLocale in sptLangs ) {
285+ if ( sptLangs [ sptLocale ] === locale ) {
286+ localeFilename = sptLocale ;
287+ break ;
288+ }
289+ }
290+ return tarkovSpt . localesOld ( { ...options , targetFile : localeFilename } ) . then ( locales => locales [ locale ] ) ;
291+ } ,
282292 locales : async ( options = defaultOptions ) => {
283293 const localeData = await getFolderData ( {
284294 ...options ,
@@ -296,6 +306,23 @@ const tarkovSpt = {
296306 }
297307 return locales ;
298308 } ,
309+ localesOld : async ( options = defaultOptions ) => {
310+ const localeData = await getFolderData ( {
311+ ...options ,
312+ folderLabel : 'locales' ,
313+ folderPath : `contents/${ sptDataPathStub } locales/global` ,
314+ filePrefix : 'locale_old' ,
315+ } ) ;
316+ const locales = { } ;
317+ for ( const sptLocale in localeData ) {
318+ const isoLocale = sptLocale !== 'en' ? sptLangs [ sptLocale ] : 'en' ;
319+ if ( ! isoLocale ) {
320+ continue ;
321+ }
322+ locales [ isoLocale ] = localeData [ sptLocale ] ;
323+ }
324+ return locales ;
325+ } ,
299326 quests : ( options = defaultOptions ) => {
300327 const { download } = merge ( options ) ;
301328 return downloadJson ( 'quests.json' , `${ sptDataPath } templates/quests.json` , download ) ;
0 commit comments