fix: integratie user + errors gefixt zodat het runt + format
This commit is contained in:
		
							parent
							
								
									6c4ea0eefb
								
							
						
					
					
						commit
						1b096b411b
					
				
					 55 changed files with 858 additions and 594 deletions
				
			
		|  | @ -1,7 +1,7 @@ | |||
| import fs from 'fs'; | ||||
| import path from 'path'; | ||||
| import yaml from 'js-yaml'; | ||||
| import { FALLBACK_LANG } from "../config.js"; | ||||
| import { FALLBACK_LANG } from '../config.js'; | ||||
| 
 | ||||
| export function loadTranslations<T>(language: string): T { | ||||
|     try { | ||||
|  | @ -13,7 +13,11 @@ export function loadTranslations<T>(language: string): T { | |||
|             `Cannot load translation for ${language}, fallen back to dutch` | ||||
|         ); | ||||
|         console.error(error); | ||||
|         const fallbackPath = path.join(process.cwd(), '_i18n', `${FALLBACK_LANG}.yml`); | ||||
|         const fallbackPath = path.join( | ||||
|             process.cwd(), | ||||
|             '_i18n', | ||||
|             `${FALLBACK_LANG}.yml` | ||||
|         ); | ||||
|         return yaml.load(fs.readFileSync(fallbackPath, 'utf8')) as T; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl