mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Update warning message for missing locale
This commit is contained in:
		
							parent
							
								
									959f2cd61d
								
							
						
					
					
						commit
						678e80bb8b
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -30,7 +30,7 @@ export default class Replacer {
 | 
				
			||||||
			if (text.hasOwnProperty(path)) {
 | 
								if (text.hasOwnProperty(path)) {
 | 
				
			||||||
				text = text[path];
 | 
									text = text[path];
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				console.warn(`path '${path}' not found in '${this.lang}'`);
 | 
									if (this.lang === 'ja') console.warn(`path '${path}' not found`);
 | 
				
			||||||
				return key; // Fallback
 | 
									return key; // Fallback
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					@ -46,10 +46,10 @@ export default class Replacer {
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (error) {
 | 
							if (error) {
 | 
				
			||||||
			console.warn(`key '${key}' not found in '${path}' of '${this.lang}'`);
 | 
								if (this.lang === 'ja') console.warn(`key '${key}' not found in '${path}'`);
 | 
				
			||||||
			return key; // Fallback
 | 
								return key; // Fallback
 | 
				
			||||||
		} else if (typeof text !== 'string') {
 | 
							} else if (typeof text !== 'string') {
 | 
				
			||||||
			console.warn(`key '${key}' is not string in '${path}' of '${this.lang}'`);
 | 
								if (this.lang === 'ja') console.warn(`key '${key}' is not string in '${path}'`);
 | 
				
			||||||
			return key; // Fallback
 | 
								return key; // Fallback
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			return text;
 | 
								return text;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue