FlineDev / RemafoX

Report issues, request features or ask for help for the ReMafoX app here.
30 stars 1 forks source link

[Bug] Cannot change project in Add Translation Window #74

Closed croyfoo closed 1 year ago

croyfoo commented 1 year ago

Steps to Reproduce:

I have two projects setup in RemafoX. Project 'A' works fine, when try to use the shortcut to replace strings in project 'B', project 'A' is always selected and I cannot change to Project 'B'

Expected Behavior:

Select the correct RemafoX project that matches may Xcode project

Environment

Show environment details - App Version: 1.3.1 (Build 60) - System Version: 13.2 (Build 22D49) - System CPU: Apple M1 Pro - Tier: Pro
Jeehut commented 1 year ago

@croyfoo Thank you for reporting this issue. Can you please provide the context where you're trying to "change" the project? Do you mean in the Add Translation Window? What exactly happens when you select "Project A", does it jump back to "Project B" immediately? Have you changed something recently in the paths of your project files?

One thing you could try if this happens is to remove the project in the Projects Browser within RemafoX by pressing the Trash icon for Project B and then simply double-press the .remafox configuration file in Project B and provide access to the project directory (it will auto-select the right folder, just press "Allow"). This basically resets the RemafoX paths cache for your project. If this doesn't work, please let me know.

croyfoo commented 1 year ago

@Jeehut Thank you for the quick response. Yes in the "Add Translation Window" is where it has the wrong project selected and I try an select the correct one. I have attached a video that show the issue. I'm working in the "Momentum Sales" Project, I highlight the string that I want to translate, the RemafoX window pops up with the FoldingText Project selected, I try to select the Momentum Sales project. I will try and reset the project as you described.

https://user-images.githubusercontent.com/681564/217667481-1d47f803-2e62-4597-8a67-bf2ca0ee8901.mov

croyfoo commented 1 year ago

@Jeehut, I reset the cache using your suggestion and I still have the same issue.

Thanks for you help. David

Jeehut commented 1 year ago

@croyfoo Thank you for providing additional information and trying the path cache reset.

If that didn't work, may I ask if you have any localized .strings files in the "MomentumSales" project? A "localized" file means a file placed in a folder with a two-letter lang code and .lproj, such as en.lproj. I suspect that if the selection doesn't work, that RemafoX can't find one.

If you do have one, then my next idea would be to check if the "Paths to Search" specified in the projects' .remafox config file is correct. Just navigate to the "Search Paths" pane and press the "Preview matching files" button there, if that doesn't show you any .strings files, then you need to adjust your paths. See attached images to find the right place and an example of what the "Matching Files" should look like.

Bildschirm­foto 2023-02-08 um 23 56 30 Bildschirm­foto 2023-02-08 um 23 56 58

Please let me know if this helps.

croyfoo commented 1 year ago

I have translated most of my project and then I started having this issue. If you look at the attached image I originally use es-419 as a dialect of Spanish. Then I removed that localization and I think that is when I started having problems. I added it back to see if that was the issue and I still was experiencing this issue.

Here is what is displayed:

On Feb 8, 2023, at 5:58 PM, Cihat Gündüz @.***> wrote:

@croyfoo https://github.com/croyfoo Thank you for providing additional information and trying the path cache reset.

If that didn't work, may I ask if you have any localized .strings files in the "MomentumSales" project? A "localized" file means a file placed in a folder with a two-letter lang code and .lproj, such as en.lproj. I suspect that if the selection doesn't work, that RemafoX can't find one. If you do have one, then my next idea would be to check if the "Paths to Search" specified in the projects' .remafox config file is correct. Just navigate to the "Search Paths" pane and press the "Preview matching files" button there, if that doesn't show you any .strings files, then you need to adjust your paths. See attached images to find the right place and an example of what the "Matching Files" should look like.

https://user-images.githubusercontent.com/6942160/217670443-d628f5e0-112b-498a-a9c8-387bf0ea3f28.png https://user-images.githubusercontent.com/6942160/217670440-a9c2dc1b-4c5f-4ae0-9c9b-bd7aa56de629.png Please let me know if this helps.

— Reply to this email directly, view it on GitHub https://github.com/FlineDev/RemafoX/issues/74#issuecomment-1423348058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFGMXFI46W2S6NXGHGC7VDWWQQJRANCNFSM6AAAAAAUVVXWKU. You are receiving this because you were mentioned.

Jeehut commented 1 year ago

@croyfoo I see, thank you for the information that it worked before. Unfortunately, I can't see any image attached here to see what you mean. But here are a few more things to check:

  1. I just want to let you know that RemafoX currently doesn't support the Spanish dialect es-419, which shouldn't cause this issue though. You could use es without a dialect instead. RemafoX should simply ignore languages it doesn't support and not behave as described. You can always find a list of all supported languages here.

  2. When you say that you "removed that localization", what exactly did you do? Did you remove it from the list of "Localizations" in the Xcode project settings? Did you check the option "Delete localized resource files from disk" when doing so? If the latter is the case, it is possible that you still have the enclosing folders es-419 in your project as empty directories. It is possible that this confuses RemafoX while searching for all Strings file paths. You could try deleting them and resetting the project again as described above.

  3. If step 2 also doesn't resolve things, the best way I can help you is if you send me your project structure without sending me your real code so I can investigate the issue on my end without having to bother you anymore. I just wrote this guide how to do that in an easy way.

I hope this helps.

croyfoo commented 1 year ago

Cihat, A little feedback on the issue I’m having. I created the example project and realized that if I delete project ‘B’ it works. So I went back to ‘A’ project after I removed the ‘B’ project it works fine. It appears to be an issue with the two projects interacting. I will let you know when I get some time to investigate further.

Thank you for you help.

On Feb 9, 2023, at 3:36 AM, Cihat Gündüz @.***> wrote:

@croyfoo https://github.com/croyfoo I see, thank you for the information that it worked before. Unfortunately, I can't see any image attached here to see what you mean. But here are a few more things to check:

I just want to let you know that RemafoX currently doesn't support the Spanish dialect es-419, which shouldn't cause this issue though. You could use es without a dialect instead. RemafoX should simply ignore languages it doesn't support and not behave as described. You can always find a list of all supported languages here https://github.com/FlineDev/RemafoX/discussions/70#discussioncomment-4684083.

When you say that you "removed that localization", what exactly did you do? Did you remove it from the list of "Localizations" in the Xcode project settings? Did you check the option "Delete localized resource files from disk" when doing so? If the latter is the case, it is possible that you still have the enclosing folders es-419 in your project as empty directories. It is possible that this confuses RemafoX while searching for all Strings file paths. You could try deleting them and resetting the project again as described above.

If step 2 also doesn't resolve things, the best way I can help you is if you send me your project structure without sending me your real code so I can investigate the issue on my end without having to bother you anymore. I just wrote this guide https://github.com/FlineDev/RemafoX/discussions/75 how to do that in an easy way.

I hope this helps.

— Reply to this email directly, view it on GitHub https://github.com/FlineDev/RemafoX/issues/74#issuecomment-1423818126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFGMXERLKRKU2B3CG7H7RTWWST7JANCNFSM6AAAAAAUVVXWKU. You are receiving this because you were mentioned.

Jeehut commented 1 year ago

Okay, that's weird. Please let me know of any further findings. If you can provide me steps to reproduce (e.g. starting from the state of "no projects at all") then I could investigate and fix any issues. Last time I tested, multiple projects worked fine.

Jeehut commented 1 year ago

@croyfoo I just reworked the navigation & window management of the app and fixed a lot of bugs along the way. I also fixed a weird bug about the picker you've struggled with here in the Add Translation window. Because the bug was so weird, I actually wrote an article to share my learnings.

While I couldn't exactly reproduce the behavior you describe, I'm optimistic that the root cause was the same and therefore this issue should hopefully be fixed now, too. The fix will ship with version 1.5.0 in a couple of days.

Thanks again for reporting and for your patience. I was pretty busy till 3 weeks ago, but I'm finally back at work in full speed and new exciting features will be coming to RemafoX very soon. If you do come across this issue again after updating to 1.5.0, please let me know and I'll reopen and re-investigate.