Stano 143 Posted August 14, 2023 I don't know it yet. I just tried something. My point is whether the custom component can be translated. I have no idea. It shows me units (red) that I don't care about. From the program there are blue units. The others are system ones and I don't want to have/see them there. I need what is in the Localization directory. Thank you Note: I would appreciate if the individual nodes/units could be hidden. Just the ones that are not to be translated. It would greatly increase readability and work. Share this post Link to post
Anders Melander 1782 Posted August 14, 2023 I'm not really sure if this is what you're asking for but you can indicate which modules to translate and which to ignore by right-clicking and changing their status: and then you can filter on the status: You can do the exact same in the string grid: Share this post Link to post
Stano 143 Posted August 15, 2023 You can already see by the picture that I have no problem with it. I would love to hide them!!! This is the main question: 15 hours ago, Stano said: My point is whether the custom component can be translated. Share this post Link to post
Anders Melander 1782 Posted August 15, 2023 I'm still not sure what you're saying - or asking. You hide rows by filtering them out: Hover over the Status column header, click the button that appears in the header. Select the statuses that should be visible. Like in my screenshots. 17 hours ago, Stano said: My point is whether the custom component can be translated. That's not really a question, but anyway: If your component strings appear in the string grid, then they can be translated; All resourcestrings and published component string (and string list) properties can be translated. Share this post Link to post
Stano 143 Posted August 15, 2023 1 hour ago, Anders Melander said: That's not really a question, but anyway: If your component strings appear in the string grid, then they can be translated; All resourcestrings and published component string (and string list) properties can be translated. The problem is that I don't see the unit with resourcestrings in the component in the list. I'll try that anyway. I'll play with it. Share this post Link to post
Anders Melander 1782 Posted August 15, 2023 1 hour ago, Stano said: The problem is that I don't see the unit with resourcestrings in the component in the list. All resourcestrings, regardless of the unit they come from, are listed under the Resourcestrings module node. Share this post Link to post
Stano 143 Posted August 15, 2023 I have: amTranslationManagerInstall-2.0.8370.39904 - year 2019 So I went through it. I have understood/figured out where and how to get to the filters. How the filters and Find work. I searched for pumAutoIns from: LocNavigator unit; resourcestring pumAutoIns = 'Automatically insert the next record'; Unfortunately, it's not there Share this post Link to post
aehimself 396 Posted August 15, 2023 1 minute ago, Stano said: I have: amTranslationManagerInstall-2.0.8370.39904 - year 2019 So I went through it. I have understood/figured out where and how to get to the filters. How the filters and Find work. I searched for pumAutoIns from: LocNavigator unit; resourcestring pumAutoIns = 'Automatically insert the next record'; Unfortunately, it's not there Resource strings are prefixed with the unit name they are in; so it should be named LocNavigator_pumAutoIns It must be there. Never met any resource string left out by BTM. Share this post Link to post
Stano 143 Posted August 15, 2023 (edited) No, it's not there. The point is that it's a custom navigator drop on the form. Maybe something needs to be done in component. I'd love to get my hands on a newer version. The internet hasn't helped me. Edited August 15, 2023 by Stano Share this post Link to post
Anders Melander 1782 Posted August 15, 2023 40 minutes ago, Stano said: I have: amTranslationManagerInstall-2.0.8370.39904 - year 2019 That's the newest release; It's from December 2022. I don't know where you you got the year 2019 from. 25 minutes ago, Stano said: No, it's not there. The point is that it's a custom navigator drop on the form. Maybe something needs to be done in component. Nothing special needs to be done. If the resourcestring is implemented in unit XXX and you drop a component from XXX onto a form in unit YYY of project ZZZ, then the IDE will include unit XXX in unit YYY's uses clause and when you compile ZZZ, the resourcestring will appear in the ZZZ.drc file (it's a text file) located the sample place as ZZZ.exe. If you don't have ZZZ.drc then you need to configure your project to produce that file (see the project linker options) - but BTM should complain if it can't find the file. Share this post Link to post
Stano 143 Posted August 15, 2023 34 minutes ago, Anders Melander said: f the resourcestring is implemented in unit XXX and you drop a component from XXX onto a form in unit YYY The component itself is in the jstEnNavigator unit. But the resourcestrings are in the LocNavigator unit. I have moved the resourcestrings to the jstEnNavigator unit. No change. Share this post Link to post
Anders Melander 1782 Posted August 15, 2023 (edited) Can you see the resourcestring in the .drc file? [edit] Btw, have you remembered to update the translation project after these changes? If you don't update the translation project it will only contain the strings that were in your project when you created the translation project. Edited August 15, 2023 by Anders Melander Share this post Link to post
Stano 143 Posted August 15, 2023 44 minutes ago, Anders Melander said: Can you see the resourcestring in the .drc file? No. 44 minutes ago, Anders Melander said: Btw, have you remembered to update the translation project after these changes? I did. After the update, one item was added to the project. I have no idea which one. Files Pokusy.drc, Pokusy.exe and Pokusy.xlat are together in one directory. The other files, dpr..., are elsewhere. Share this post Link to post
Stano 143 Posted August 15, 2023 The project consists of a single form and a DataModule. The content of the form can be seen in the image. Share this post Link to post
Stano 143 Posted August 15, 2023 I added a resourcestring to the form. Nowhere, drc and project BTM, no change. unit UPokusActionBar; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, System.Actions, System.ImageList, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ActnList, Vcl.ImgList, Vcl.ActnMan, Vcl.Buttons, Vcl.DBCtrls, Vcl.PlatformDefaultStyleActnCtrls, Vcl.StdStyleActnCtrls, Vcl.XPStyleActnCtrls, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.VirtualImageList, DBAccess, Data.DB, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, FireDAC.Stan.Async, FireDAC.DApt, FireDAC.Comp.DataSet, FireDAC.Comp.Client, VirtualTrees, jstEnNavigator, jstVirtualStringTree, dmBasic, MemDS, IBC; resourcestring aa = 'bbb'; type TForm2 = class(TForm) vilLitN: TVirtualImageList; vilLitD: TVirtualImageList; vilLitH: TVirtualImageList; vilLrgN: TVirtualImageList; vilLrgD: TVirtualImageList; vilLrgH: TVirtualImageList; ds1: TDataSource; ibds1: TIBCDataSource; ibtbl1: TIBCTable; fdtb1: TFDTable; jstvst1: TjstVirtualStringTree; jstnv1: TjstEnNavigator; end; var Form2: TForm2; implementation {$R *.dfm} end. Share this post Link to post
Anders Melander 1782 Posted August 15, 2023 15 minutes ago, Stano said: resourcestring aa = 'bbb'; If you are not actually using that string anywhere then it's probably being eliminated by the linker. Resourcestrings are only ever loaded from STRINGTABLE resources and the STRINGTABLE resources (and the .drc file) are produced by the linker based on the units linked into the application. If you add a ShowMessage(aa) to the above example then I bet the resourcestring will appear. Regardless, I think we can conclude that this isn't a BTM problem. Share this post Link to post
Stano 143 Posted August 15, 2023 I never claimed that this is a BTM problem. I was looking for guidance and failed. I already have it in the project. Only now have I found out that I was searching wrong. I already have it I was looking for the title but I should have been looking for the content Share this post Link to post
Stano 143 Posted August 16, 2023 How can I hide these items? I have 184 items displayed. I am interested in about 75 items. Share this post Link to post
Anders Melander 1782 Posted August 16, 2023 That's "obsolete" items. Items that existed in a prior version of your application but which have been deleted since they were first imported. That usually happens when you delete components or units. You can't really hide them (that's a missing feature) but you can delete them: Or you can just mark them "Don't translate" and hide them that way. The reason they aren't just deleted automatically is that their translations (if they have any) can be reused by other items. For example, if you rename a component, then the translation-to-component link is broken but by comparing the source texts, BTM can move the link to the new component so the translation isn't lost. The Recover action does this. The translations of obsolete items are also still used as translation suggestions. Share this post Link to post
Stano 143 Posted August 16, 2023 (edited) Thank you. They cannot be described as "Do not translate". Edited August 16, 2023 by Stano Share this post Link to post
Anders Melander 1782 Posted August 16, 2023 29 minutes ago, Stano said: Thank you. They cannot be described as "Do not translate". No, you're right; They cannot. 30 minutes ago, Stano said: Assuming this means that you cannot purge them, can you zip the translation project (just the xlat file) and post it as a DM to me. Share this post Link to post
Stano 143 Posted August 16, 2023 I'd like to have some guidance so I don't post so much here. The link to your page will show it clean. I will send the project. Share this post Link to post
Anders Melander 1782 Posted August 16, 2023 Reproduced. I'll investigate now. Share this post Link to post
Anders Melander 1782 Posted August 16, 2023 Fixed. The purge was rejected unless the project contained obsolete items with translations. Get the new release (2.0.8628.30767) here: https://bitbucket.org/anders_melander/better-translation-manager/downloads/ Changes since the last release (2.0.8370.39904): Fix for unable to purge project unless it contains Unused translations. #43: Specify external PE resource module stub via command line #41: DeepL Integration Added Save As... action. Previously the Save action always prompted for filename. Share this post Link to post