Coder Social home page Coder Social logo

Looking for translators about sysdvr HOT 25 OPEN

exelix11 avatar exelix11 commented on June 13, 2024
Looking for translators

from sysdvr.

Comments (25)

exelix11 avatar exelix11 commented on June 13, 2024 2

Translation support is now functional for the client, you can find the default strings file in https://github.com/exelix11/SysDVR/blob/translation-support/Client/Platform/Resources/resources/strings/english.json

You can submit a pull request to the translation-support branch or just provide your translated file here or on discord.
To test your translations you can get a build from github actions https://github.com/exelix11/SysDVR/actions/runs/7586908510 and add your custom json file in Resources\strings

Let me know if any issue pops up., in the meantime i'll look into adding translation support to the console settings app as well.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024 1

Starting with 6.0 the new GUI also builds for mac, linux and android making Windows projects specific stuff like resx either unapplicable or a pain to use which is why i was proposing jsons. Android in particular is a very annoying platform to support properly.

Most notably we lose winforms magic font support that just works and have to manually manage fonts and character ranges. This is the reason why localization didn't make it into the 6.0 release.

from sysdvr.

sskyNS avatar sskyNS commented on June 13, 2024

Good job bro! I can provide translation contributions in Simplified Chinese(zh-CN) and Traditional Chinese(zh-TW)~

from sysdvr.

THZoria avatar THZoria commented on June 13, 2024

Very good idea, my team on discord would be ready to work for the French part ^^

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

cc @spreedated who worked on translations in #253

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

My fork is still up and running.
Technically you have some choices to provide localization. Via JSON is only one, another common is an INI File or XML, actually any Textfile will do.
I used the built-in Microsoft method of Globalization Namespace.

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

Indeed, I share your view on this one and I guess an XML style or JSON is the best practice approach for it.
I'm not aware of any preexisting libraries for JSON localization, but doing it on your own isn't that difficult.
I would go with a separate project to implement the localization logic, plus I'm not sure about the existing GUI design pattern, but an implementation on MVVM should be easy when the bindable and observable properties are used correctly.

However, I'm way too technical here, as for the translators, I could provide translation in German and Polish.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

As for design, we are constrained by the lowest common denominator for cross platform.
In particular on desktop I use AOT to build framework-less binaries (so no reflection) and on android the same to build as a dynamic library I can call from Java.

Essentially, the application is a console app with sdl and imgui, which is an immediate mode gui that runs in a loop, kinda like a game engine.

Such is the unfortunate state of cross platform user interfaces that are not a web browser.

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

Depending on which platforms you aim for, MAUI (former XAMARIN) is also a good approach, it aims at MVVM which implies cross-platform compatibility by strict encapsulation. AOT is common all over the .NET framework anyways and native Java library is used in the android part of MAUI.

However, with your approach using SDL/OpenGL makes it somehow independent and more versatile, but also more work to do since you have to build the layout, pages, behaviors (which imgui helps alot with) etc. yourself, also the architecture of the application.

Tbh, I am not familiar with the latest state of the project and I just saw that you released 6.0 last week so I'll definitely give it a shot. Keep up the good work!

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

Last time i tried MAUI it did not feel stable yet, i did considering trying UNO or Avalonia though. The main problem that made me pick SDL in the end is the video renderer.

Truns out there is no "batteries included" library that allows playing raw video data without a proper container so i had to manually use ffmpeg which produces a framebuffer for each frame decoded. SDL gives me the low level flexibility of making a double buffered GPU renderer that does not allocate memory for each frame, other WPF-like frameworks did not seem to support this in a cross-platform way at the time i looked into it.

from sysdvr.

DarrenWarrenV avatar DarrenWarrenV commented on June 13, 2024

pl-PL here if needed!

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

I made some initial work in the translation-support branch. This is still experimental, do not start translating yet.

Translation files will look like this:

{
  "translationName": "English",
  "translationAuthor": "SysDVR",
  "systemLocale": [
    "en-us"
  ],
  "imGuiGlyphRange": "Default",  // optional
  "fontName": "OpenSans.ttf", // optional
  "mainGUI_ChannelLabel": "Select the streaming mode",
  "mainGUI_ChannelVideo": "Video only",
  "mainGUI_ChannelAudio": "Audio only",
  // etc...
}

Of particular interest are the imGuiGlyphRange and fontName fields. These can be used to add support for other alphabets. In particular the first field must be one of these values and the latter the name of a font file to be embedded in the resources folder.

The systemLocale array contains which system locales are covered by this file so on first launch sysdvr will already match the system language, users will still be able to change it from the settings.

To be included in SysDVR, fonts will have to be distributed under an open license, a good example is Google Noto which seems to implement most alphabets.

Any objections to this design ?

Once this is done i'll start to think about what to do with the on-console settings app since that does have some text as well, but uses a different architecture.

from sysdvr.

DarrenWarrenV avatar DarrenWarrenV commented on June 13, 2024

No objections and instant help if needed.

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

I made some initial work in the translation-support branch. This is still experimental, do not start translating yet.

Translation files will look like this:

{
  "translationName": "English",
  "translationAuthor": "SysDVR",
  "systemLocale": [
    "en-us"
  ],
  "imGuiGlyphRange": "Default",  // optional
  "fontName": "OpenSans.ttf", // optional
  "mainGUI_ChannelLabel": "Select the streaming mode",
  "mainGUI_ChannelVideo": "Video only",
  "mainGUI_ChannelAudio": "Audio only",
  // etc...
}

Of particular interest are the imGuiGlyphRange and fontName fields. These can be used to add support for other alphabets. In particular the first field must be one of these values and the latter the name of a font file to be embedded in the resources folder.

The systemLocale array contains which system locales are covered by this file so on first launch sysdvr will already match the system language, users will still be able to change it from the settings.

To be included in SysDVR, fonts will have to be distributed under an open license, a good example is Google Noto which seems to implement most alphabets.

Any objections to this design ?

Once this is done i'll start to think about what to do with the on-console settings app since that does have some text as well, but uses a different architecture.

Just my two cents, but instead of using prefixes for the categories, we could use objects.

{
"localeInfo":
{
  "author": "SysDVR",
  "imGuiGlyphRange": "Default",  // optional
  "fontName": "OpenSans.ttf" // optional
},
"localization": 
 {
  "mainGui": 
                    {
                            "channelLabel": "Select the streaming mode",
                            "channelVideo": "Video only",
                            "channelAudio": "Audio only"
                    },
  "settings": 
                    {
                            "settings": "Settings",
                    }
//etc.
 }
}

Another thing about encapsulation comes to the locale array; imho it's better to have separate files for each locale and named it properly inside the locale folder like "en-US.json" "de-DE.json" etc. (filenaming by languagecode) so they can be identified this way.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

I figured one might want the same language file for multiple locales, on start the app will load all the jsons (deserializing only the metadat fields) and pick the matching locale.

As for encapsulation, I'll think about it, don't see any real advantage cause I can't use fancy techniques like dependency injection or auto mapping to pages. Meant the prefixes as context for translators cause I happened to do some software translating and the lack of context in string files reduces the overall quality if the translator is not paying attention.

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

SysDVR-Client.exe (process 22988) exited with code -1073740940

Happens 6/10 times trying to debug.
There seems to be an AccessViolationExcpetion in Line 81 of ImFontGlyphRangesBuilder.gen.cs.

public void Clear()
{
    ImGuiNative.ImFontGlyphRangesBuilder_Clear((ImFontGlyphRangesBuilder*)(NativePtr));
}

Maybe NativePtr didn't got initialized correctly or pointed to a read/write protected part of the memory.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

Are you using latest commit ? i think I fixed this already. Also provide a stack trace of the crash.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

Re-reading the code it may also be non zeroed memory in the font builder constructor, but it's weird it didn't trip at all for me during development on both windows and android.

I'll look into it but not before this weekend as I'm busy irl.

from sysdvr.

spreedated avatar spreedated commented on June 13, 2024

image

Okay, I think I fixed it by changing the MemAlloc to the ImGui native GlyphRangesBuilder.
By testing, 10/10 times runs normally :)

You can find it within my PR for the german translation:

cf0c751

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

only now found some time to look at your fix, I had completely missed that cimgui exposed a wrapper for the constructor. I did some debugging and the issue was indeed not zeroing memory but your fix is probably better.

from sysdvr.

exelix11 avatar exelix11 commented on June 13, 2024

I just added translation support for the on-console settings app, you can find the strings json file here: https://github.com/exelix11/SysDVR/blob/translation-support/SysDVRConfig/romfs/strings/english.json

from sysdvr.

teuchezh avatar teuchezh commented on June 13, 2024

I can help with the translation into Russian

from sysdvr.

ar1810 avatar ar1810 commented on June 13, 2024

I can help with the spanish translation

from sysdvr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.