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 translation templates (introduced in Modelica 3.6) #4267

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beutlich
Copy link
Member

Now that we enabled (soft) MoLang 3.6 features, we can easily add the translation template files. Of course, they need to be updated each time before tagging a release. Therefore the strings are sorted by identifier to have it diff-friendly.

@HansOlsson @henrikt-ma Please check in Dymola and WSM, respectively, if the files are correctly generated.

@beutlich beutlich added L: Resources Issue addresses Modelica/Resources (excl. C-Sources) requires Modelica 3.6 Issue that requires Modelica Language Specification 3.6 labels Jan 16, 2024
@beutlich beutlich added this to the MSL4.1.0 milestone Jan 16, 2024
@beutlich
Copy link
Member Author

@casella Feel free to update the milestone if this is not yet considered for MSL 4.1.0. I didn't want to miss the opportunity though what's possible with new MoLang 3.6.

@tobolar
Copy link
Contributor

tobolar commented Jan 17, 2024

Of course, they need to be updated each time before tagging a release.

Not only the original english texts shall be updated. Ideally, also all translations. (So maybe we would need "Language officers" as well. :-D )

And, in oder to populatize the multilingual feature, making public a routine for generation of pot-files from english documentation would be beneficial.

@HansOlsson
Copy link
Contributor

HansOlsson commented Jan 17, 2024

I don't think we should add it for this release (possibly except the file-settings):

  • They are quite large files - increasing the size of the distribution.
  • It doesn't add anything for users in itself.
  • And I don't think we can realistically expect actual translations for this release.

BTW: Dymola 2024x can generate such templates with
generateTranslationFile("Modelica", "Modelica.pot");
And there's some way of reading them as well and (partially) using them - contact me if needed.

I guess we should document that more.

Additionally it is somewhat complicated to compare the files due to the sorting. I would prefer if we avoid that sorting.

I checked Complex and to me it seems as if the templates are based on an earlier version (e.g. "

c3 = sum(conj(c1[k]) * c2[k] for k in 1:n)\n" from Complex.'*'.scalarProduct was missing).

Copy link
Contributor

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

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

The files don't seem up-to-date.

I would also prefer if the strings weren't sorted, and I'm not sure if we should add it for this release.

@beutlich
Copy link
Member Author

BTW: Dymola 2024x can generate such templates with
generateTranslationFile("Modelica", "Modelica.pot");

Nice!

When opening the generated POT file in Poedit translation tool I get a warning on duplicate items:

grafik

@beutlich beutlich changed the title Add translation templates (new by Modelica Language Specification 3.6) Add translation templates (introduced in Modelica 3.6) Jan 17, 2024
@tobolar
Copy link
Contributor

tobolar commented Jan 18, 2024

BTW: Dymola 2024x can generate such templates with
generateTranslationFile("Modelica", "Modelica.pot");
And there's some way of reading them as well and (partially) using them - contact me if needed.

Nice. My first try here https://github.com/tobolar/Credibility/tree/multilingualDescriptions

@beutlich
Copy link
Member Author

BTW: Dymola 2024x can generate such templates with
generateTranslationFile("Modelica", "Modelica.pot");
And there's some way of reading them as well and (partially) using them - contact me if needed.

Nice. My first try here https://github.com/tobolar/Credibility/tree/multilingualDescriptions

Yes, that was also my assumption that both template and translations should be part of the repository.

@beutlich beutlich marked this pull request as draft January 18, 2024 20:58
Copy link
Contributor

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Unfortunately, we don't have support for library translations yet in System Modeler, so I'm unable to try this out.

@AHaumer
Copy link
Contributor

AHaumer commented Jan 24, 2024

Discussed this in today's MAP-Lib meeting, not realistic for 4.1.0 -> shift the milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Resources Issue addresses Modelica/Resources (excl. C-Sources) requires Modelica 3.6 Issue that requires Modelica Language Specification 3.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants