FreeCAD / FreeCAD-translations

Repository tracking localization issues and progress
5 stars 3 forks source link

BIM add-on → main menu #225

Closed kaktusus closed 1 year ago

kaktusus commented 1 year ago
OS: Debian GNU/Linux 12 (bookworm) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33110 (Git) AppImage
Build type: Release
Branch: master
Hash: 18e40941ceb36c52701a7c74ea26043ef3385701
Python 3.11.3, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.2, OCC 7.7.1
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * Curves 0.5.0
  * sheetmetal 0.2.56
  * Reinforcement
  * BIM 2021.12.0

Main menu labels are displayed in wrong code page after loading BIM workbench.

obraz

Instead of diacritical characters, "funny marks" are displayed. In addition, this strings disappeared from Crowdin for the add-on BIM.

eg. https://crowdin.com/translate/freecad-addons/32152/en-pl?filter=basic&value=0#q=&Kre%C5%9Blenie%202D https://crowdin.com/translate/freecad-addons/32152/en-pl?filter=basic&value=0#q=Prz&yci%C4%85ganie https://crowdin.com/translate/freecad-addons/32152/en-pl?filter=basic&value=0#q=&Zarz%C4%85dzanie

They are also not in the main Crowdin repository for FreeCAD.

In this workbench there are more problems related to the lack of translations in the GUI.

yorikvanhavre commented 1 year ago

This is strange, it is done the same way as other workbenches... Are other python-based workbenches like Draft, Arch, etc... working OK?

kaktusus commented 1 year ago

Are other python-based workbenches like Draft, Arch, etc... working OK?

Yes

kaktusus commented 1 year ago

We also have two old tickets that have not been resolved so far.

  1. https://github.com/FreeCAD/FreeCAD-translations/issues/135

  2. https://github.com/FreeCAD/FreeCAD-translations/issues/136

kaktusus commented 1 year ago

Today I was surprised by the behavior of the program. Having BIM WB loaded, I switched the application language to English. To my surprise, the standard options were reloaded to English. The menu belonging to BIM was reloaded to Polish with the correct code page. Only by restarting the program and BIM wb did the full English version appear.

yorikvanhavre commented 1 year ago

Ah yes indeed. I didn´t find how to have addon translations of menus retranslated by FreeCAD on language switch... Not sure if that's possible actually.. @chennes do you know?

kaktusus commented 1 year ago

@yorikvanhavre
we had a similar problem with the code page with Bézier string, as I recall the problem was on the side of your development environment

yorikvanhavre commented 1 year ago

Should be solved with the above commit. But of course it will take time for translators to update their translations. I'll leave this open so we don't forget to check

kaktusus commented 1 year ago

I'm glad. :wink:

kwahoo2 commented 1 year ago

Hi,

These strings stays in English for me sshot

OS: Fedora Linux 37 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33617 (Git) AppImage
Build type: Release
Branch: master
Hash: ae215724dd6c5336dcbb263733c6830a24917963
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * freecad-mbdyn-dynamics-workbench
  * BIM 2021.12.0
  * freecad.gears 1.0.0
luzpaz commented 1 year ago

@kwahoo2 are the strings available to translate in freecad-addon crowdin ?

kaktusus commented 1 year ago

all are available and translated, example Modify https://crowdin.com/translate/freecad-addons/32152/en-pl#6620885

kaktusus commented 1 year ago

fixed

OS: Debian GNU/Linux trixie/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33631 (Git) AppImage
Build type: Release
Branch: master
Hash: 2167fb6f7ec6ac5c2f6365d4c3035d2db6879b1e
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * Curves 0.5.0
  * sheetmetal 0.2.56
  * Reinforcement
  * BIM 2021.12.0
  * Rocket 3.1.0
  * kicadStepUpMod 10.19.4
  * fasteners 0.4.56
  * Alternate_OpenSCAD 1.0.0
  * Render 2023.2.6

image

kaktusus commented 1 year ago

overall, no the error persists I forgot that I previously activated Arch wb.

image

kaktusus commented 1 year ago

Today, for a test, I did a local import of translations for BIM. The issue did not occur.

yorikvanhavre commented 1 year ago

This should in any case be solved now with https://github.com/yorikvanhavre/BIM_Workbench/commit/83620ae44a424424981d36a7fa6c7a7eaa68d348

kwahoo2 commented 1 year ago

It is fixed for me.

yorikvanhavre commented 1 year ago

closing, then!

kaktusus commented 1 year ago

When I do a local import of translations the problem does not exist.

image

If I run FreeCAD without a local translation file there is a problem with the encoding of these characters.

image

@kwahoo2 Can you check it with you with the latest AppImage?

kaktusus commented 1 year ago

I started looking through the sources on GitHub with translations for the BIM workbench.

https://github.com/yorikvanhavre/BIM_Workbench/blob/3928e0a9301026ae74a5e1cae8b8dfaca1edf095/translations/BIM_pl.ts

This file is very old. I don't see the reason for the character encoding problem in it. Probably at that time everything was still working properly. Where can I find up-to-date sources with the current translation file ... I would like to try to identify the problem.

kaktusus commented 1 year ago

Most work after the BIM update.

obraz

There remains one &2D Drafting that was not included in the source code fixes. [line #571] It is interesting to note that in all the friends I asked the problem does not occur.

After installing BIM I looked at the translation source files and there I can read the translation correctly.

kaktusus commented 1 year ago

Notice that the 3D / BIM menu now appears twice. :fearful:

yorikvanhavre commented 1 year ago

Notice that the 3D / BIM menu now appears twice. fearful

Weird, this does not happen here with me... Any error message?

image

kaktusus commented 1 year ago

I have not had any error messages

However, in your image, I see the menu name in an unfamiliar language ...

Desenho2D

yorikvanhavre commented 1 year ago

Indeed that "2D drawing" menu didn't update... I had to restart FreeCAD. It's weird, it still shows wrong characters...

image

I have no idea what is causing this, though... Everything is the the same as other menu items in the InitGui file. Maybe something wrong with the translation on crowdin? Can you check if it's correct there?

kaktusus commented 1 year ago

I downloaded the translation file from Crowdin. I also reviewed the translation file in the sources on GitHub. I did not find any anomalies.

The only sensible comment of this situation I wrote here: https://github.com/FreeCAD/FreeCAD-translations/issues/225#issuecomment-1656286541

edit:

obraz

I do not know what the difference is in these instructions, but the last edition in the two cases you covered the change helped.

yorikvanhavre commented 1 year ago

Aah good catch! I had missed that one. It's now fixed!

kaktusus commented 1 year ago

All in all, it is very puzzling why only in my case the error occurs. It seems that you have a good tester in my person .... :laughing:

yorikvanhavre commented 1 year ago

And testing is super important and a very big part of bugfixing... Thanks!

luzpaz commented 1 year ago

Well done!

kaktusus commented 1 year ago

Now and with me everything works properly after the BIM update.

image