mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Unlink messages pot first before generating a new one in translation update
This commit is contained in:
		@@ -5,6 +5,9 @@ if sys.platform == 'win32':
 | 
				
			|||||||
    pybabel = 'flask\\Scripts\\pybabel'
 | 
					    pybabel = 'flask\\Scripts\\pybabel'
 | 
				
			||||||
else:
 | 
					else:
 | 
				
			||||||
    pybabel = 'pybabel'
 | 
					    pybabel = 'pybabel'
 | 
				
			||||||
 | 
					try:
 | 
				
			||||||
 | 
					    os.unlink('titanembeds/translations/messages.pot')
 | 
				
			||||||
 | 
					except:
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o titanembeds/translations/messages.pot titanembeds')
 | 
					os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o titanembeds/translations/messages.pot titanembeds')
 | 
				
			||||||
os.system(pybabel + ' update -i messages.pot -d titanembeds/translations')
 | 
					os.system(pybabel + ' update -i messages.pot -d titanembeds/translations')
 | 
				
			||||||
os.unlink('messages.pot')
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user