[FEATURE REQUEST] Add action to check source strings#4807
[FEATURE REQUEST] Add action to check source strings#4807
Conversation
7689a00 to
4bc6ef4
Compare
1fa16c4 to
cf3a224
Compare
changelog/unreleased/4807
Outdated
| Enhancement: GitHub action to validate source strings | ||
|
|
||
| A new GitHub action has been added to validate the source strings and prevent errors in translation ci system from the first step | ||
|
|
||
| https://github.com/owncloud/android/pull/4807 |
There was a problem hiding this comment.
IMO, I'd write the calens like this (juts to align all entries for workflows) 😄
A similar example: #4759
| Enhancement: GitHub action to validate source strings | |
| A new GitHub action has been added to validate the source strings and prevent errors in translation ci system from the first step | |
| https://github.com/owncloud/android/pull/4807 | |
| Enhancement: Workflow to validate source strings | |
| A new workflow has been added to validate the source strings and prevent errors in translation CI system from the first step | |
| https://github.com/owncloud/android/pull/4807 |
| <string name="create_space_dialog_empty_error">El nombre del space no puede estar vacío</string> | ||
| <string name="create_space_dialog_length_error">El nombre del space no puede exceder 255 caracteres</string> | ||
| <string name="create_space_dialog_characters_error">Caracteres prohibidos: / \\ . : \? * &quot; \' > < |</string> | ||
| <string name="create_space_dialog_characters_error">Caracteres prohibidos: / \\ . : \? * \" \' > < |</string> |
There was a problem hiding this comment.
I think there are more string files with &quot; and $quot; values:
values-de-rDE/strings.xml
values-de/strings.xml
They should be replaced, right? 🤔
There was a problem hiding this comment.
Right, they seem to be added after the first task in the PR. Fixing...
| <string name="auth_unsupported_auth_method">The server does not support this authentication method</string> | ||
| <string name="auth_fail_get_user_name">Your server is not returning a correct user ID. Please contact an administrator. | ||
| </string> | ||
| <string name="auth_fail_get_user_name">Your server is not returning a correct user ID. Please contact an administrator.</string> |
There was a problem hiding this comment.
The same for indentation. I think there are more string files that need a refactor
There was a problem hiding this comment.
In this case, i put the focus in the strings.xml because is the only file that the workflow checks. Would it be a good idea to check all the translations file to indent or remove line breaks?
There was a problem hiding this comment.
The number of involved strings is very high... it may not woth
a499e9f to
4bf06c0
Compare
Two actions were addressed here:
In the
strings.xmlfile, some tiny changes to normalize the file against the validation script: remove some useless line breaks, and replace"for the escaped\"The action will run a script to check if every string in
strings.xmlcontains any forbidden character (non-escaped). The list of forbidden characters is set inside the script (i expect the list to be very static). The utilxmlstarletwill be used to parse the xml file and provide every entry one by one by using the process substitution operationFor the moment, the check will not be mandatory. Let's give a try, and, if it works fine, we could become mandatory
Related Issues
App:
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)QA