Open Closed

Problems with translating ABP (confusing instructions, does not seem to work etc.) #8415


User avatar
0
improwise created

There seem to be problems/confusion regarding how to translate ABP so I create a ticket here as well, also because there might be differences between ABP Free and Commercial. Also considering that you may or may not have access to the source code needed for things outside of the ABP open source framework.

https://github.com/abpframework/abp/issues/21473

Please provide updated instructions on how we can translate ABP Commercial to Swedish (or any other language for that matter) in a way that works properly with latest ABP version. We don't mind doing a lot of the required leg work and sharing the result as long as we get clear instructions/documentation on how to do it.

Thanks.


18 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please send an email to liming.ma@volosoft.com

    I will share the abp-translation.json file.

  • User Avatar
    0
    improwise created

    This issue is still not completed (although currently on hold on our side).

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can share the abp-translation.json when you add new translated texts.

    Thanks.

    The bot will close the question regularly. You can reopen it at any time.

  • User Avatar
    0
    improwise created

    hi

    You can share the abp-translation.json when you add new translated texts.

    Thanks.

    The bot will close the question regularly. You can reopen it at any time.

    Hi,

    Have sent you the translated file now with some additional questions.

    With this being a commercial product and there are now things like DeepL available at a low cost, I think that ABP should take over the responsibility of providing translations for the mostly used/requested languages. This especially as the translation process is quite complicated due to not all source code being public (or available to all ABP Commercial customers) and the process itself has lots of potential pitfalls. Also, as I understand it, there is no way for us to test a translated JSON ourselves as that would most likely require access to all the source code to be able to "apply" it. Depending on which of the instructions you read on how to translate, there already seem to be built in support for DeepL in the ABP translation process, so it should be quite easy for ABP Team to do the translation even though you probably do not speak the language yourselves.

    We used DeepL ourselves to do the translation, and then just checked the result afterwards as much as we could and made some small changes. While not perfect, I think it is probably good enough.

    Thanks.

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    The new translation texts, will be available in next 9.0 patch version:

    Thank you for your text!

  • User Avatar
    0
    improwise created

    Thanks!

    I noticed the term "Dashboard" seem to be missing in the JSON (even in English), not an obvious translation for that in Swedish though (besides a direct translation that sounds really funny) so probably better to keep as it is.

    If not already modified, there needs to be added Swedish to AbpLocalizationOptions also

    options.Languages.Add(new LanguageInfo("sv", "sv", "Svenska"));

    There is also the sv.json file for Domain.Shared/Localization which I will provide in a follow up message. Not sure how that works 100% since there is supposed to be the chosen appname for where we have put "MY_APP_NAME", that is probably automatic I would guess.

    This entry seems incorrect in English also BTW, should probably be "provided a" rather than "provide" and the translation "Du har redan svarat" but there are probably quite a few of these if you start to nitpick, guess the most important is that the main UI is as correct as possible.

                {
                    "LocalizationKey": "Forms:0001",
                    "Reference": "You already provide response.",
                    "Target": "Du ger redan svar."
                },
                
    
  • User Avatar
    0
    improwise created

    sv.json file for Domain.Shared/Localization/AppName

    {
      "Culture": "sv",
      "Texts": {
        "AppName": "MY_APP_NAME",
        "Menu:ContactUs": "Kontakta oss",
        "Menu:ArticleSample": "Artikelexempel",
        "Home": "Hem",
        "Date": "Datum",
        "Permission:Dashboard": "Dashboard",
        "Menu:Dashboard": "Dashboard",
        "Menu:HomePage": "Hemsida",
        "Dashboard": "Dashboard",
        "ExternalProvider:Google": "Google",
        "ExternalProvider:Google:ClientId": "Klient-ID",
        "ExternalProvider:Google:ClientSecret": "Klienthemlighet",
        "ExternalProvider:Microsoft": "Microsoft",
        "ExternalProvider:Microsoft:ClientId": "Klient-ID",
        "ExternalProvider:Microsoft:ClientSecret": "Klienthemlighet",
        "ExternalProvider:Twitter": "Twitter (X)",
        "ExternalProvider:Twitter:ConsumerKey": "Konsumentnyckel",
        "ExternalProvider:Twitter:ConsumerSecret": "Konsumenthemlighet",
        "NewsletterHeader": "Prenumerera på nyhetsbrevet!",
        "NewsletterInfo": "Få information om de senaste händelserna.",
        "NewsletterPreference_Default": "Standardnyhetsbrev",
        "NewsletterPrivacyAcceptMessage": "Jag accepterar <a href='/privacy-policy'>Sekretesspolicy</a>.",
        "Language": "Språk",
        "Search": "Söka",
        "LoadMore": "Ladda mer",
        "Settings": "Inställningar",
        "Theme": "Tema",
        "DeviceTheme": "Enhetstema",
        "Dark": "Mörk",
        "Light": "Ljus",
        "Unspecified": "System",
        "SeeAllUsers": "Se Alla användare",
        "TakePhoto": "Ta foto",
        "ChoosePhoto": "Välj Foto",
        "Menu:Home": "Hem",
        "LongWelcomeMessage": "Välkommen till ansökan. ",
        "Welcome": "Välkomna"
      }
    }
    
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    Thanks, I will update the template project. 👍

  • User Avatar
    0
    improwise created

    hi

    Thanks, I will update the template project. 👍

    Thanks.

    When can we expect this to be available in an ABP release?

    Is there a way we can apply the translations we made even before that to our local installation? Would imagine it might require access to the entire source code to do it (ie abp translate -a )?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    When can we expect this to be available in an ABP release?

    You can try to upgrade Studio to 0.9.16 and create a project.

    Is there a way we can apply the translations we made even before that to our local installation? Would imagine it might require access to the entire source code to do it (ie abp translate -a )?

    If you find a module missing sv, I will share the abp-translation.json again.

    Thanks.

  • User Avatar
    0
    improwise created

    hi

    When can we expect this to be available in an ABP release?

    You can try to upgrade Studio to 0.9.16 and create a project.

    Hi,

    We tried this using ABP Studio 0.9.16 which created a solution with ABP 9.0.1

    First thing we noticed is that Swedish (sv) now seem to be the default language, at least it was the one preselected in the newly created solution. Not a problem for us but would imagine for others.

    We also noticed that the UI is still a mix of English and Swedish

    (Books is just because we selected the new option to generate a CRUD page)

    Looking at the JSON file we sent you, we have things like

                {
                    "LocalizationKey": "Password",
                    "Reference": "Password",
                    "Target": "Lösenord"
                },
    

    Yet, at least in the screen shot above, it still shows up as "Password" instead of "Lösenord" even with Swedish selected.

    All this of course assumes that the translated JSON actually made it into current release

    Edit:

    I believe there must be translations simply missing here as for example "Language management" seem to be translated as it should in your screen shots above, but not in mine in this message etc.

  • User Avatar
    0
    improwise created

    Seems like this could have been the classic case of ABP Suite lagging behind with regards to CLI and ABP Suite despite claiming to be at the latest version. When we manually forced an upgrade to 9.0.2 it seems like the translations did kick in as they should, even though we have only looked at it briefly for now.

    There are still some weirdness going on though, like the UI can't seem to decide what language it should be in and it seems to jump back and forth, in our case, English and Swedish, on page loads etc. I am guessing that is more a problem/bug not directly related to Swedish, but testing it out, there actually seem to be a language difference here. Selecting Finish (FI), it seem to stick to that, selecting Swedish (SV), it seems to jump back and forth for page (re)loads.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi

    What’s your project UI type?

    Can you share a gif picture?

  • User Avatar
    0
    improwise created

    Hi

    What’s your project UI type?

    Can you share a gif picture?

    It seems that this might have been the result of us having to manually "force upgrade" to 9.0.2, have cleaned and rebuilt the sample now and currently we can not reproduce this problem. But lets keep the ticket open for now, I think we will have to wait to test this until ABP Studio actually supports 9.0.2 with the latest translations. Thanks.

  • User Avatar
    0
    improwise created

    This just popped up (meaning "An internal error has occurred") but based on the error message it is probably not related to the translations itself but is rather a general 9.0.2 bug.

    hook.js:608 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Method not found: string Blazorise.IClassProvider.TableRowHoverCursor() System.MissingMethodException: Method not found: string Blazorise.IClassProvider.TableRowHoverCursor() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<HandleVirtualize>d__47](<HandleVirtualize>d__47& stateMachine) at Blazorise.DataGrid.DataGrid1[[Volo.Abp.LanguageManagement.Dto.LanguageDto, Volo.Abp.LanguageManagement.Application.Contracts, Version=9.0.2.0, Culture=neutral, PublicKeyToken=null]].HandleVirtualize() at Blazorise.DataGrid.DataGrid1.<OnAfterRenderAsync>d__42[[Volo.Abp.LanguageManagement.Dto.LanguageDto, Volo.Abp.LanguageManagement.Application.Contracts, Version=9.0.2.0, Culture=neutral, PublicKeyToken=null]].MoveNext()

    Edit:

    Reported it here instead, could be due to us upgrading Blazorise at the same time https://abp.io/support/questions/8330/Bugs--Issues-v90x?CurrentPage=2#answer-3a16d259-d951-b052-1a80-5aa176a3ba90

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you create a new question for this? We will refund your question ticket.

    Let's use the current question only to track the translation problem.

    Thanks.

  • User Avatar
    0
    improwise created

    hi

    Can you create a new question for this? We will refund your question ticket.

    Let's use the current question only to track the translation problem.

    Thanks.

    Added it to the genral ABP 9 bugs and issues as well as an explanation why it failed (even though you would probably need to look into this for when you upgrade).

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks 🙏

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09