Skip to content

Add Serbian translations (Cyrillic & Latin)#280

Merged
activescott merged 4 commits intoactivescott:masterfrom
rammba:features/serbian-2026-02-04
Feb 15, 2026
Merged

Add Serbian translations (Cyrillic & Latin)#280
activescott merged 4 commits intoactivescott:masterfrom
rammba:features/serbian-2026-02-04

Conversation

@rammba
Copy link
Copy Markdown
Contributor

@rammba rammba commented Feb 4, 2026

Hello @activescott @mega5800, thanks for maintaining this great tool.

As a native Serbian speaker and maintainer of translations for Notepad++, official React docs and other open-source projects I wanted to add Serbian here as well.

P.S. Please check if I configured translation files into the project correctly (within lessmsi.msbuild & LessMsi.Gui.csproj). I've made my changes based on Korean translation in #259.

@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 4, 2026

Thank you @rammba for these translations.

Let me check if your pr runs correctly on my local window machine and I'll approve the commit or add any missing settings.

@mega5800 mega5800 self-requested a review February 7, 2026 10:32
@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 7, 2026

Hi @rammba.

I've just checked your PR and it works fine, expect for one bug.
Latin Serbian:
image

Cyrillic Serbian:
image

First, I'd like to know if we can keep only one translation, the one which is more popular in Serbia.

Second, I noticed a bug in the language selection form when one of the Serbian translations is selected.
Normally, when a language is selected, the corresponding radio button is checked.
I.e - selecting Chinese:
image

However, when Serbian is selected (regardless of the version) the radio button isn't checked:
image
image

Please select one translation and solve this bug (perhaps selecting one version will solve this bug).

Thanks.

Copy link
Copy Markdown
Collaborator

@mega5800 mega5800 left a comment

Choose a reason for hiding this comment

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

Please, select one translation and solve the bug shown in my message

@rammba
Copy link
Copy Markdown
Contributor Author

rammba commented Feb 7, 2026

Hello @mega5800, thanks for the feedback.

I've made changes to how CultureInfo is created and used.
Previously, it was used CultureInfo.TwoLetterISOLanguageName which returns sr for both versions of Serbian language. CultureInfo.Name was set as a dictionary key on line 75, and it was compared to CultureInfo.TwoLetterISOLanguageName on line 86.
Also, CultureInfo.CreateSpecificCulture always returns most specific culture (including country code) (sr-Cyrl-RS when you invoke it with sr-Cyrl), so I've changed it to new CultureInfo which will just return the provided culture.
You can check all .NET cultures in this document: net-cultures.csv. Serbian cultures are on lines 690-700.

I think you would get similar problems with #266 because it introduces specific version of Chinese.

I'd like to know if we can keep only one translation, the one which is more popular in Serbia.

If you still want to have just one Serbian language I can remove Latin version, but I don't think it's a good idea. I would say that both versions are almost equaly used, even though Cyrillic is more formal one. All Serbian speakers can understand both, but some people prefer first version, others prefer second one.

P.S. I want to mention that the bug you found shouldn't always be fixed by the translator. In this case I knew what should be done because I'm working in .NET quite often. But there are other translators who just do the translation and are not developers at all.

Thanks for the patience 🚀
rammba

@rammba rammba force-pushed the features/serbian-2026-02-04 branch from 7d6e96d to 7d6e1a1 Compare February 7, 2026 12:14
@rammba rammba requested a review from mega5800 February 7, 2026 12:15
@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 7, 2026

Hi @rammba,

Please use a single Serbian translation, the one that fits best, and revert the changes in ChangeLanguageForm.cs, as the existing logic is designed to work with one translation version.

Please also update your branch with the latest master.
I noticed a force push, which may otherwise lead to merge issues.

Regarding the bug,
I asked you to solve the bug due to your software development background.
In any other case, I'd do it myself.

Thanks.

@rammba
Copy link
Copy Markdown
Contributor Author

rammba commented Feb 7, 2026

Hello @mega5800,

The existing logic is designed to work with one translation version.

I've made changes to support multiple versions, so I don't see a problem having both versions.
If you think it's too much changes for translation PR, I can make another PR with just CultureInfo changes and assign them to the repo owner. Maybe that's the better solution. After that, I can introduce another Serbian version. Please let me know if that sounds as a good idea to you.

I asked you to solve the bug due to your software development background.

Oh I didn't thought you checked my profile. Thanks for doing that.

@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 7, 2026

@activescott any thoughts?

Thanks

@activescott
Copy link
Copy Markdown
Owner

@activescott any thoughts?
First, my thanks to @rammba for the contribution! I really appreciate it. 🎉 🚀

I think the bug fix wrt TwoLetterISOLanguageName makes sense so lets definitely keep that unless @mega5800 sees a specific problem with it.

I don't think the force-push will cause any problems as long as the branch is up to date and has no merge conflicts (which I believe we enforce on this project anyway).

I don't have a concern with the two translations as long as @rammba makes a reasonable commitment to help us fix them if issues are identified or we add new strings we can tag him for adding them. I don't expect it to be a lot of work. Given his contributions in other projects, I am comfortable that he'll provide them.

I'll defer to @mega5800 on whether he wants it in the same PR as the translations or separate. I don't have a strong opinion.

And as always, thanks to @mega5800 for testing and helping move Lessmsi forward! 🙇‍♂️

Using `new CultureInfo` instead of `CultureInfo.CreateSpecificCulture`
Using `CultureInfo.Name` instead of `CultureInfo.TwoLetterISOLanguageName`
@rammba rammba force-pushed the features/serbian-2026-02-04 branch from 7d6e1a1 to d94a98b Compare February 8, 2026 09:30
@rammba
Copy link
Copy Markdown
Contributor Author

rammba commented Feb 8, 2026

Hello @activescott, thanks for the quick response and feedback.

Given his contributions in other projects, I am comfortable that he'll provide them.

I will definitely work on future translations as well. From time to time I check projects where I had translation contributions and update untranslated labels, so here will be the same case.

I don't think the force-push will cause any problems as long as the branch is up to date and has no merge conflicts (which I believe we enforce on this project anyway).

There are no conflicts for now. Some maintainers requires rebasing, some are fine with merge commits so I never know what is expected. About the merging, for me it's totally fine if you just squash all PR changes into one commit.

@activescott
Copy link
Copy Markdown
Owner

We squash merge the PR so as long as there are no conflicts, the branch is up to date, and the checks pass we won't see anything after it merges.

@mega5800 Do you have any remaining concerns about merging this?

@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 9, 2026

@activescott let me review the pr locally on my pc and check if everything works well.

@mega5800
Copy link
Copy Markdown
Collaborator

mega5800 commented Feb 9, 2026

Hi @rammba.

I've check your PR and noticed that the current language (in my case English) isnt checked in the ChangeLanguage form.
Here is a gif of the bug:
lang bug

Please solve this.

Thanks.

Use CultureInfo.Parent for comparing CultureInfo objects
@rammba
Copy link
Copy Markdown
Contributor Author

rammba commented Feb 9, 2026

Hello @mega5800, sorry for introducing that bug.
It turned out that problem was in comparing child & parent cultures, as you can see on the screenshot. This wasn't problem before, because we used TwoLetterISOLanguageName which is the same for all cultures of the same parent.

Screenshot_126

I've added extension method for parent-child culture comparison and it works fine now.

P.S. It can happen to initially load "non-existing" child culture (opening language dialog and clicking Save), sr-Latn-RS in my case, but it will properly fallback to defined sr-Latn resource:
Screenshot_127

I hope I didn't make too much mess with these culture changes. You always need to be very careful using them ⌛

@mega5800
Copy link
Copy Markdown
Collaborator

Hi @rammba.

I checked the PR and can verify that the bug was solved.
I think we are good to go with merging this PR.

@activescott, any final thoughts?

@activescott activescott merged commit c67217a into activescott:master Feb 15, 2026
2 checks passed
@activescott
Copy link
Copy Markdown
Owner

🎉 This PR is included in version 2.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rammba rammba deleted the features/serbian-2026-02-04 branch February 15, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants