cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
388 stars 34 forks source link

Add language chooser to LaTeX document wizard #330

Closed oscfdezdz closed 1 year ago

oscfdezdz commented 1 year ago

List of languages from Babel User guide, section 1.27.

There are more languages available, but according to the user guide:

Most of them work out of the box, but some may require extra fonts, encoding files, a preprocessor or even a complete framework (like CJK or luatexja).

Fixes #171

imagen

oscfdezdz commented 1 year ago

I went with ToggleButton instead of StackSwitcher which seemed more for Stack widget.

Not sure if languages names should be translatable, it's probably better to add them translated directly to the XML.

cvfosammmm commented 1 year ago

Looks really cool. Is this ready for merging?

oscfdezdz commented 1 year ago

Yes, although reading your comment again, I interpreted it differently. In the current state, the dropdown updates the buttons when the dialog is opened again, is that ok? It could easily be changed.

the dropdown would be just for "others.." and if a language is choosen from it, it is added to the toggle buttons and activated.

I also think that the languages should be translated in the XML directly and not left to translators, what do you think?

cvfosammmm commented 1 year ago

The buttons should update immediately, and the chosen language should become the first in the row. If the others don't fit in the line, they will be removed.

The languages should be translated like other strings. That's because the user knows the language of the interface. It would be different if the choice would be for an interface language.

cvfosammmm commented 1 year ago

You can always go back to the simple selection box btw.

oscfdezdz commented 1 year ago

The buttons should update immediately, and the chosen language should become the first in the row. If the others don't fit in the line, they will be removed.

It's working now, buttons are limited to two, as the length of the longer language names together fit well.

cvfosammmm commented 1 year ago

looks good