harmony 鸿蒙Pseudo-Localization Testing for Translation
Pseudo-Localization Testing for Translation
Use Cases
Pseudo-localization testing is used to identify problems that may cause abnormal UI, layout, or text display during translation.
Text truncation or abnormal UI layout: For software components such as menus, text areas, keys, and check boxes, the text length is usually adjusted to adapt to the source language (usually English) during UI design, and then the text alignment, position, and line spacing are adjusted on this basis. However, the text length often increases after translation, leading to abnormal UI layout or text truncation in an inappropriate position. For example, Russian or Norwegian words are usually longer than English words. If the reserved space on the UI is small, the text that exceeds the scope is truncated, and consequently the translated text cannot be displayed completely.
Abnormal text or symbol display: This is usually due to a lack of fonts or typesetting capabilities of the system. This issue typically stems from an assumption during development that users would not input special characters or text in specific languages. For example, if a user enters Uyghur text on a Chinese UI, the text may not be properly displayed.
Test Process
Switch to the target locale for pseudo-localization testing, for example, en-XA. You can switch the locale through the code (system permission required):
import { i18n } from '@kit.LocalizationKit'; i18n.System.setSystemLanguage('en-XA')
Traverse the applications to be tested.
Test Item
Check the UI for text truncation or distortion, or abnormal layout. Text truncation can be observed by checking whether the text ends with ] (a right square bracket). If the text does not end with ], it is not completely displayed.
Check for hard coding problems. Hard coding of UI text can be observed by checking whether the text is processed in pseudo-translation format.
Check for string concatenation problems. String concatenation can be observed by checking whether strings in the pseudo-translation format appear in the same control in a consecutive manner, for example, [string 1][string 2].
Check for multilingual text display problems. If the text is not properly displayed, for example, squares or blanks are present or the text is incomplete or partially truncated, the display is abnormal.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Character Processing
harmony 鸿蒙Overview of Internationalization and Localization
harmony 鸿蒙Language and Locale Name Localization
harmony 鸿蒙Locale ID and Cultural Habit Division
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦