-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
71 lines (60 loc) · 1.78 KB
/
Copy pathconfig.py
File metadata and controls
71 lines (60 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
"""
Relative path of the project
ie : project_path = '../'
"""
project_path = '../'
"""
Pathes where file doesn't be analyze
ie : excluded_pathes = ['Pods/']
"""
excluded_pathes = ['Pods/']
"""
Patterns of the files to analyze in code
ie : files_to_analyze = ['*.swift', '*.m']
"""
files_to_analyze = ['*.swift', '*.m', '*.h']
"""
All languages to test
ie : languages = ["fr","en","es"]
"""
languages = ['de','en','es','fr','it','ru','tr','zh','pl']
"""
Folder path of the localizable files
ie : localizable_string_folder_path = 'Ressources/strings/'
"""
localizable_string_folder_path = 'Ressources/strings/'
"""
Names of the localizable file to test
ie : localizable_string_files = ["Localizable"]
"""
localizable_string_files = ['Localizable']
"""
Regex to find localized keys
ie = localized_string_in_code_regex = [r'["]\w+["][.]localized']
"""
localized_string_in_code_regex = [r'["]\w+["][.]localized', r'NSLocalizedString[(]@["]\w+["], nil[)]']
"""
White list regex of localizable keys
ie : localizable_key_regex = [r'[A-Z0-9_]+']
"""
localizable_key_regex = [r'[A-Z0-9_]+', r'iMSG_[A-Z0-9_]+', r'[A-Z0-9_]+_[a-zA-Z0-9_]+']
"""
Regex to define the unwanted prefix/suffix keys
ie :
unwanted_localizable_key_prefix = r'(?!UNWANTED_PREFIX)'
unwanted_localizable_key_suffix = r'(?<!UNWANTED_SUFFIX)'
"""
unwanted_localizable_key_prefix = r'(?!RUGBYRAMA_)'
unwanted_localizable_key_suffix = r'(?<!_RUGBYRAMA)'
"""
Outputs of the report
"""
report_output_console = True
report_output_html = True
"""
Path to generate the report in HTML format
Can be used with a Jenkins to display the report after each test
Jenkins Plugin : https://wiki.jenkins-ci.org/display/JENKINS/Summary+Display+Plugin
ie : html_output_file = "./translate_reports.html"
"""
report_output_html_filepath = './translate_reports.html'