Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for another way to extract localizable strings #662

Closed
didrocks opened this issue Apr 3, 2023 · 1 comment
Closed

Look for another way to extract localizable strings #662

didrocks opened this issue Apr 3, 2023 · 1 comment
Labels
jira Import to Jira

Comments

@didrocks
Copy link
Member

didrocks commented Apr 3, 2023

Some changes like #659 were merged to ensure that all strings are translatable (due to xgettext ignoring backquotes in C format.

However, complying to this is hurting readability:

-		Long: i18n.G(`Can run as a service through the service manager or interactively as a standalone application.
The program will monitor the configured directories for changes and bump the appropriate GPT.ini versions anytime a change is detected.
If a GPT.ini file does not exist for a directory, a warning will be issued and the file will be created. If the GPT.ini file is incompatible or malformed, the program will report an error.
`),
+		Long:  i18n.G("Can run as a service through the service manager or interactively as a standalone application.\n\nThe program will monitor the configured directories for changes and bump the appropriate GPT.ini versions anytime a change is detected.\nIf a GPT.ini file does not exist for a directory, a warning will be issued and the file will be created. If the GPT.ini file is incompatible or malformed, the program will report an error.\n"),

Or even worse:

-	status := fmt.Sprintf(i18n.G(`%s
-%s
-Next Refresh: %s
-%s
-Active Directory:
 - %s
-Daemon:
-  Timeout after %s
-  Listening on: %s
-  Cache path: %s
-  Run path: %s
-  Dconf path: %s
-  Sudoers path: %s
-  PolicyKit path: %s
-  Apparmor path: %s`), updateMachine, updateUsers, nextRefresh,
+	status := fmt.Sprintf(i18n.G("%s\n%s\nNext Refresh: %s\n\n%s\n\nActive Directory:\n  %s\n\nDaemon:\n  Timeout after %s\n  Listening on: %s\n  Cache path: %s\n  Run path: %s\n  Dconf path: %s\n  Sudoers path: %s\n  PolicyKit path: %s\n  Apparmor path: %s"), updateMachine, updateUsers, nextRefresh,

Maybe we should look at some other solution to still be able to extract those strings too without modifying this and reverting those changes.

@didrocks didrocks added the jira Import to Jira label Apr 3, 2023
@didrocks
Copy link
Member Author

This is now done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Import to Jira
Projects
None yet
Development

No branches or pull requests

1 participant