UXDivers / Grial-UI-Kit-Support

This is our public repository for customers to report bugs about Grial UI Kit for Xamarin Forms
61 stars 26 forks source link

Utility to generate culture resx files #692

Open npagare opened 4 years ago

npagare commented 4 years ago

Hello, any recommendations for utility or VS extension to convert AppResources.resx file to target language(s) ?

dirivero commented 4 years ago

If you add a culture in Grial you get a renamed copy of that .resx file with prefixed strings ready to be translated. Are you asking for a tool to help doing the translation?

VS Windows has a specific editor for editing these files although I've always preferred editing the XAML directly. If you are looking for something better this one may help: https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager

npagare commented 4 years ago

If you add a culture in Grial you get a renamed copy of that .resx file with prefixed strings ready to be translated. Are you asking for a tool to help doing the translation?

VS Windows has a specific editor for editing these files although I've always preferred editing the XAML directly. If you are looking for something better this one may help: https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager

Yes, I am trying to use the ResXManager - but it requires backend translation API subscription. Have you tried Azure Translation API with it? Did you used it the pricing model F0 or some other one?

dirivero commented 4 years ago

No, I haven't tried that API. We did Grial translations manually.

npagare commented 4 years ago

No, I haven't tried that API. We did Grial translations manually.

Well.. how do you support your custom App building solutions where some time you will need set of resx files to support target languages and to convert dynamic content as applicable ?

Diego, I am also facing error while dealing with calendar and data. Even with UmAlQuraCalendar uncommented in the AppDelegate.cs my app keep getting errors whereever I am doing data calculations. Do I have to change data calculation code everywhere in my App where RTL functionality is required ?

    private void ReferenceCalendars()
    {
        // When compiling in release, you may need to instantiate the specific
        // calendar so it doesn't get stripped out by the linker. Just uncomment
        // the lines you need according to the localization needs of the app.
        // For instance, in 'ar' cultures UmAlQuraCalendar is required.
        // https://bugzilla.xamarin.com/show_bug.cgi?id=59077

        new System.Globalization.UmAlQuraCalendar();
        // new System.Globalization.ChineseLunisolarCalendar();
        // new System.Globalization.ChineseLunisolarCalendar();
        // new System.Globalization.HebrewCalendar();
        // new System.Globalization.HijriCalendar();
        // new System.Globalization.IdnMapping();
        // new System.Globalization.JapaneseCalendar();
        // new System.Globalization.JapaneseLunisolarCalendar();
        // new System.Globalization.JulianCalendar();
        // new System.Globalization.KoreanCalendar();
        // new System.Globalization.KoreanLunisolarCalendar();
        // new System.Globalization.PersianCalendar();
        // new System.Globalization.TaiwanCalendar();
        // new System.Globalization.TaiwanLunisolarCalendar();
        // new System.Globalization.ThaiBuddhistCalendar();
    }
dirivero commented 4 years ago

We don't do dynamic translations. We have English (LTR) and Arabic (RTL) manually written texts and if you pick another culture we just generate placeholder strings for you to replace in the correspondent resx files (for instance, a Spanish placeholder text for "Back" would be "[es] Back", nothing dynamically translated).

Does it throw an exception? That would be the behavior if a required calendar is stripped by the linker. I don't understand what you meant by "data calculations".

npagare commented 4 years ago

Yes, it does throw an exception. How do I make sure the required calendar is added by the linker in the debug mode? I meant to say "date calculations" as shown in the pic below.

image