Skip to content

Support locale option for variables title in outline#48

Merged
Mc-Zen merged 2 commits intoMc-Zen:mainfrom
F0rgenet:main
Apr 9, 2025
Merged

Support locale option for variables title in outline#48
Mc-Zen merged 2 commits intoMc-Zen:mainfrom
F0rgenet:main

Conversation

@F0rgenet
Copy link
Copy Markdown
Contributor

@F0rgenet F0rgenet commented Apr 8, 2025

I added locales support for variable title in default styles outlines

/// `local-names: (parameters: [Paramètres], default: [Défault], variables: [Alterné])`.
/// -> dictionary
local-names: (parameters: [Parameters], default: [Default], variables: [Variables])

Closes #47

However it seems to me that supporting #set text(lang: ...) will be full solution, this one is partial

@Mc-Zen
Copy link
Copy Markdown
Owner

Mc-Zen commented Apr 8, 2025

Hi @F0rgenet ,

thank you, I had missed this! I also see a a better solution in the future but it is not trivial because for once I don't know these words in all existing languages and there might be variations in certain languages and the user wants to select...

Comment thread src/show-module.typ Outdated
Comment thread src/styles/default.typ
@F0rgenet
Copy link
Copy Markdown
Contributor Author

F0rgenet commented Apr 8, 2025

Im preparing another PR in this topic, it will add #set text(lang: ...) support, i asked AI to translate those words to all typst supported languages (AI is good at translating), i think this might work, will open PR shortly, need to discuss some things about it

Also I have a question, will it be better as separate PR or I can update this one?

@Mc-Zen
Copy link
Copy Markdown
Owner

Mc-Zen commented Apr 8, 2025

Oh, I'm curious! Mind that there still needs to be a way to set the word manually in case someone wants a special version.

Actually, sooner or later, Tidy will get an overhaul with types that one can use set and show rules on. This will change the entire picture including how themes are built. But we can still work on this now because it might still take a while until Typst gets user-defined types.

Let's do a separate PR! lt will be cleaner this way and then we can decide which one(s) to merge.
So should I wait to merge this one?

@F0rgenet F0rgenet requested a review from Mc-Zen April 8, 2025 21:46
@F0rgenet
Copy link
Copy Markdown
Contributor Author

F0rgenet commented Apr 8, 2025

Waiting for custom types too

@Mc-Zen
Copy link
Copy Markdown
Owner

Mc-Zen commented Apr 9, 2025

I will merge this one now, regardless of how we go with #49 because it is easy while the other one might need more time/discussion and they are compatible.

@Mc-Zen Mc-Zen merged commit f9e9616 into Mc-Zen:main Apr 9, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

Add outline localization support

2 participants