UI: Fixed default translate compiler lang
This commit is contained in:
		
							parent
							
								
									62af087e1b
								
							
						
					
					
						commit
						47f74d9956
					
				@ -140,7 +140,8 @@
 | 
			
		||||
              "ace",
 | 
			
		||||
              "ace-builds",
 | 
			
		||||
              "diff-match-patch",
 | 
			
		||||
              "tv4"
 | 
			
		||||
              "tv4",
 | 
			
		||||
              "@messageformat/parse"
 | 
			
		||||
            ]
 | 
			
		||||
          },
 | 
			
		||||
          "configurations": {
 | 
			
		||||
 | 
			
		||||
@ -45,7 +45,7 @@ export class TranslateDefaultCompiler extends TranslateMessageFormatCompiler {
 | 
			
		||||
    if (typeof src !== 'object') {
 | 
			
		||||
      if (this.checkIsPlural(src)) {
 | 
			
		||||
        try {
 | 
			
		||||
          return super.compile(src, lang);
 | 
			
		||||
          return super.compile(src, lang.replace('_', '-'));
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
          console.warn('Failed compile translate:', src, e);
 | 
			
		||||
          return src;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user