1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1 KiB
		
	
	
	
	
	
	
	
CQaS Translations
CQaS supports an extensible architecture of translations, hereby you can learn how to learn how to create your own CQaS translations and add new strings.
Translating CQaS
To translate CQaS:
- Create a file in lang/<language code>.pyand create aSTRINGSconstant mapping common IDs (seelang/en.pyto natural language templates):
from typing import Dict, Tuple, Final
__all__: Tuple[str] = ("STRINGS",)
STRINGS: Final[Dict[str, str]] = {
    "cqas_welcome": "PYTHON CODE QUALITY & SECURITY ANALYSIS REPORT",
    "analysis_complete": "Analysis completed in %s",
    "report_generated": "Report generated by the CQaS analyser v%s",
    "sec_analysis_header": "DETAILED SECURITY ANALYSIS",
    "sec_issues_by_sev": "Security Issues by Severity",
    ...
}
- Open lang/__init__.py, import your language at the top of the file and register the language in theLANGSdictionary.
Add Your Own Strings
To add your own strings to CQaS simply create a custom key name, add it to lang/en.py, and use the s() function.