mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Generate pot files script
This commit is contained in:
		
							
								
								
									
										12
									
								
								webapp/bin/tr_gen.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								webapp/bin/tr_gen.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/python3
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					import sys
 | 
				
			||||||
 | 
					if sys.platform == 'win32':
 | 
				
			||||||
 | 
					    pybabel = 'flask\\Scripts\\pybabel'
 | 
				
			||||||
 | 
					else:
 | 
				
			||||||
 | 
					    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')
 | 
				
			||||||
		Reference in New Issue
	
	Block a user