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

Add Russian translation #44

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Add Russian translation #44

merged 2 commits into from
Sep 11, 2024

Conversation

kagalenko-m-b
Copy link
Contributor

Russian-language strings for functions in "computational_thinking.jl"

Copy link
Collaborator

@adrhill adrhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this is great to have!

src/i18n/russian.jl Outdated Show resolved Hide resolved
@adrhill
Copy link
Collaborator

adrhill commented Sep 10, 2024

You also need to "register" Russian by adding it here:

# Language Options
include("english.jl")
import .PTTEnglish: EnglishUS
include("german.jl")
import .PTTGerman: GermanGermany, GermanGermanyFormal, GermanGermanyColloquial
include("spanish.jl")
import .PTTSpanish: SpanishES, SpanishFormal, SpanishColloquial
const languages_registered = Ref{Dict{String,AbstractLanguage}}(
Dict( "en" => PTTEnglish.EnglishUS(),
"en_us" => PTTEnglish.EnglishUS(),
"de" => PTTGerman.GermanGermany(),
"de_colloq" => PTTGerman.GermanGermanyColloquial(),
"de_de" => PTTGerman.GermanGermany(),
"de_de_colloq" => PTTGerman.GermanGermanyColloquial(),
"es" => PTTSpanish.SpanishES(),
"es_colloq" => PTTSpanish.SpanishColloquial(),
"es_es" => PTTSpanish.SpanishES(),
"es_es_colloq" => PTTSpanish.SpanishColloquial(),
))
const language_codes_registered = Ref{Dict{AbstractLanguage,Vector{String}}}(
Dict( PTTEnglish.EnglishUS() => ["en","en_us"],
PTTGerman.GermanGermany() => ["de","de_de"],
PTTGerman.GermanGermanyColloquial() => ["de_colloq", "de_de_colloq"],
PTTSpanish.SpanishES() => ["es", "es_es"],
PTTSpanish.SpanishColloquial() => ["es_colloq", "es_es_colloq"]
))

and possibly add it to the example as well:

Language for common prompts: $(@bind lang Select(["en"=>"English","de"=>"German","es"=>"Spanish"]) )

@kagalenko-m-b
Copy link
Contributor Author

kagalenko-m-b commented Sep 10, 2024

and possibly add it to the example as well:

Example notebook seems to work correctly, sorry about force-pushing.

@adrhill adrhill merged commit 8efd18f into JuliaPluto:main Sep 11, 2024
3 checks passed
@adrhill
Copy link
Collaborator

adrhill commented Sep 11, 2024

Thanks!

@adrhill adrhill mentioned this pull request Sep 11, 2024
@kagalenko-m-b
Copy link
Contributor Author

Thank you for quick merge, any chance of pushing that to the registry?

@adrhill
Copy link
Collaborator

adrhill commented Sep 16, 2024

Yes, I was hoping for a quick approval of #47, but I'll just go ahead and merge it.

@eford
Copy link
Collaborator

eford commented Sep 18, 2024

Your contribution should appears in v0.3.0 in the general registry soon.
Thanks for your contribution.

@eford
Copy link
Collaborator

eford commented Sep 18, 2024

@kagalenko-m-b, Could you add the Rusian text for the multi-language demonstration in the example notebook?

@kagalenko-m-b
Copy link
Contributor Author

@kagalenko-m-b, Could you add the Rusian text for the multi-language demonstration in the example notebook?

Sure, no problem, but it seems this would require some infrastructure for switching texts that is not at the moment there.

@adrhill
Copy link
Collaborator

adrhill commented Sep 18, 2024

For me, the Russian translation works in the example notebook. Just make sure to use the latest PlutoTeachingTools v0.3.0.

@kagalenko-m-b
Copy link
Contributor Author

For me, the Russian translation works in the example notebook.

It works for the titles of boxes, I thought that @eford had been talking about the main text.

@eford
Copy link
Collaborator

eford commented Sep 18, 2024

Yes, I was thinking of here

@kagalenko-m-b
Copy link
Contributor Author

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.

3 participants