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

String format and delimiters in .toml localization files #2

Closed
Patriccollu opened this issue Jun 22, 2024 · 2 comments
Closed

String format and delimiters in .toml localization files #2

Patriccollu opened this issue Jun 22, 2024 · 2 comments

Comments

@Patriccollu
Copy link
Contributor

Hello,

Some clarification about the format of strings used by localization files stored in vdhlocales repository would be very appreciated.

When checking the current versions of en_US.toml and co.toml files, we can see the presence of two different string delimiters: three simple quotes (''') or double quote (").

For example en_US.toml contains strings such as:

	GB = '''$1 GB'''
	action_bulkdownloadconvert_title = '''Bulk Download & Convert'''
	## COPIED FROM V8
	v9_coapp_required = '''Companion application required'''
	## Panel
	v9_panel_view_show_all_tabs = "Show all tabs"

Whereas Corsican localization, in co.toml file, contains:

	GB = "$1 Go"
	action_bulkdownloadconvert_title = "Scaricà è cunvertisce da gruppu"
	v9_coapp_required = "Appiecazione cumpagnu richiesta"

We can note that the same variable may have different delimiters, depending on the .toml file.

When updating co.toml file, do I need to respect the existing string delimiters or may I use always the same, for example double quote (") on ALL the strings?

Please can you clarify?

I also opened issue #896 but I don't know if it was the right place to raise this question. If not, I will close it.

Best regards,
Patriccollu.

@paulrouget
Copy link
Member

The format we're using is TOML strings, as specified here: https://toml.io/en/v1.0.0#string

So, you can use whatever works best for you (quotes, tripe simple quotes, …) as long as it's TOML compatible.

I usually prefer to use ''' to avoid quotes escaping issues.

You can validate your content with this tool: https://www.toml-lint.com/

@Patriccollu
Copy link
Contributor Author

@paulrouget
Hi Paul,

Thank you for having clarified! I also appreciate all the details provided.

I'm closing this issue, as well as #896.

Best regards,
Patriccollu.

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

No branches or pull requests

2 participants