Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up in-code uk translations | FC-55 #465

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

OmarIthawi
Copy link
Member

Clean up after #422

make pull_translations should be used

@openedx-webhooks
Copy link

openedx-webhooks commented Jun 13, 2024

Thanks for the pull request, @OmarIthawi!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/openedx-mobile-maintainers. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 13, 2024
@OmarIthawi OmarIthawi changed the title chore: clean up in-code uk translations chore: clean up in-code uk translations | FC-55 Jun 14, 2024
@volodymyr-chekyrta
Copy link
Contributor

@OmarIthawi, could you please fix the tests? You've deleted files, but something is still looking for them.

The following build commands failed:
	CopyStringsFile /Users/runner/Library/Developer/Xcode/DerivedData/OpenEdX-bsdxmseilanfjjcjomwdntdeffpi/Build/Products/DebugDev-iphonesimulator/Core.framework/uk.lproj/Localizable.strings /Users/runner/work/openedx-app-ios/openedx-app-ios/Core/Core/uk.lproj/Localizable.strings (in target 'Core' from project 'Core')

@mphilbrick211 mphilbrick211 added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Jun 20, 2024
@OmarIthawi
Copy link
Member Author

@OmarIthawi, could you please fix the tests? You've deleted files, but something is still looking for them.

The following build commands failed:
	CopyStringsFile /Users/runner/Library/Developer/Xcode/DerivedData/OpenEdX-bsdxmseilanfjjcjomwdntdeffpi/Build/Products/DebugDev-iphonesimulator/Core.framework/uk.lproj/Localizable.strings /Users/runner/work/openedx-app-ios/openedx-app-ios/Core/Core/uk.lproj/Localizable.strings (in target 'Core' from project 'Core')

I tried to fix the failing test but I'm unsure how to find the step CopyStringsFile. Could you please help?

@volodymyr-chekyrta Please try to checkout the branch, run Project -> Clean and it should fix the issue. I don't have XCode on my Linux machine which makes this not possible.

@OmarIthawi OmarIthawi added help wanted Ready to be picked up by anyone in the community and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jun 20, 2024
@volodymyr-chekyrta
Copy link
Contributor

volodymyr-chekyrta commented Jun 21, 2024

@OmarIthawi, could you please fix the tests? You've deleted files, but something is still looking for them.

The following build commands failed:
	CopyStringsFile /Users/runner/Library/Developer/Xcode/DerivedData/OpenEdX-bsdxmseilanfjjcjomwdntdeffpi/Build/Products/DebugDev-iphonesimulator/Core.framework/uk.lproj/Localizable.strings /Users/runner/work/openedx-app-ios/openedx-app-ios/Core/Core/uk.lproj/Localizable.strings (in target 'Core' from project 'Core')

I tried to fix the failing test but I'm unsure how to find the step CopyStringsFile. Could you please help?

@volodymyr-chekyrta Please try to checkout the branch, run Project -> Clean and it should fix the issue. I don't have XCode on my Linux machine which makes this not possible.

I tried this, but the project build fails.
The files are not deleted correctly because the project files are still referenced; you have to remove them from XCode.
Does anyone on your team have XCode? Or maybe I can help you with this.
image
image

@OmarIthawi
Copy link
Member Author

OmarIthawi commented Jun 21, 2024

@volodymyr-chekyrta please help, that would be really appreciated.

We only need to delete those files now they're backed to Transifex

Our iOS engineer is juggling a couple of tasks already and I need her focused on SAML SSO :) and I'm filling up gaps whenever I can.

@volodymyr-chekyrta
Copy link
Contributor

@volodymyr-chekyrta please help, that would be really appreciated.

We only need to delete those files now they're backed to Transifex

Our iOS engineer is juggling a couple of tasks already and I need her focused on SAML SSO :) and I'm filling up gaps whenever I can.

Could you please give me write permissions to this branch in your repo?
I'll fix it and push changes

@OmarIthawi OmarIthawi force-pushed the remove-uk branch 3 times, most recently from d38ef50 to 64c373c Compare June 21, 2024 14:41
@OmarIthawi
Copy link
Member Author

@volodymyr-chekyrta you now have write access to the branches. I think we need to revert the change and remove the files manually again via the XCode UI.

@volodymyr-chekyrta
Copy link
Contributor

@OmarIthawi Okay, that approach won't work :(
If we remove links from the translation files and then pull them via make pull_translations, files will be physically on the disk, but the project will not know about them.
image
image

@OmarIthawi
Copy link
Member Author

Okay, that approach won't work :(

@volodymyr-chekyrta That's an issue. How did we manage the tx pull in previous versions of the application such as:

I suppose people didn't just manually edit those files, did they?

@OmarIthawi
Copy link
Member Author

@volodymyr-chekyrta I've checked about the issue more and I have some ideas:

Option 1: Use xcString files

I'm not an iOS expert, but if the xcstrings can fit all translations in a single file, I suppose that'll help.

Which is as far as I understand, uses one JSON file for all languages.

Option 2: Automate adding the files

The other alternative it to automatically add the uk and other languages after pulling them via Transifex. This can be done via libraries like https://github.com/kronenthaler/mod-pbxproj

@OmarIthawi
Copy link
Member Author

@volodymyr-chekyrta I've made some progress regarding the XCode project file edits, I'll pickup the work again in a day or two.

@OmarIthawi OmarIthawi marked this pull request as draft June 22, 2024 02:15
@OmarIthawi OmarIthawi force-pushed the remove-uk branch 2 times, most recently from 2781be0 to d025d04 Compare June 23, 2024 11:40
Copy link
Member Author

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodymyr-chekyrta this is ready for another review.

Comment on lines 291 to 299
/* Begin PBXHeadersBuildPhase section */
0770DE3628D0A319006D8A5D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodymyr-chekyrta is this concerning?

@@ -306,7 +295,6 @@
737436DC910C5A48E4C01AC7 /* [CP] Check Pods Manifest.lock */,
07169450296D913300E3DED6 /* Sources */,
07169451296D913300E3DED6 /* Frameworks */,
07169452296D913300E3DED6 /* Resources */,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure what's being removed here by the https://github.com/kronenthaler/mod-pbxproj package. It's automatic.

@volodymyr-chekyrta
Copy link
Contributor

@OmarIthawi, seems the script adding files to the wrong location
Screenshot 2024-06-25 at 9 40 41

@volodymyr-chekyrta
Copy link
Contributor

It should be like this
image

@OmarIthawi
Copy link
Member Author

That's a bumper, a pretty bad one. Thanks for checking @volodymyr-chekyrta.

I'll study the problem more and get back to you. I'm not ready to give up yet 😅

@OmarIthawi OmarIthawi force-pushed the remove-uk branch 2 times, most recently from 1bd7036 to 47ceec4 Compare July 20, 2024 16:28
@OmarIthawi OmarIthawi marked this pull request as ready for review July 20, 2024 16:29
@OmarIthawi OmarIthawi added waiting for eng review PR is ready for review. Review and merge it, or suggest changes. and removed help wanted Ready to be picked up by anyone in the community labels Jul 20, 2024
@OmarIthawi
Copy link
Member Author

@brian-smith-tcril @volodymyr-chekyrta Hello again! I think this pull request is ready for merge.

Please take a look and let me know if you have any notes or questions.

@volodymyr-chekyrta
Copy link
Contributor

@brian-smith-tcril @volodymyr-chekyrta Hello again! I think this pull request is ready for merge.

Please take a look and let me know if you have any notes or questions.

Hi @OmarIthawi, sorry for the delay, I'll check it now

@volodymyr-chekyrta
Copy link
Contributor

volodymyr-chekyrta commented Jul 25, 2024

@OmarIthawi, the very last thing, and we are good to go.
Could you please remove this file as well:
https://github.com/Zeit-Labs/openedx-app-ios-contrib/blob/remove-uk/OpenEdX/uk.lproj/Localizable.strings
image

And then add it during the make pull_translations script.

This file is empty, but this is the way to tell the system that we support that language
https://github.com/user-attachments/assets/f54610ad-cc81-47cc-a5f3-57aee4bea7d5

Thank you 🙏

@OmarIthawi
Copy link
Member Author

Thanks @volodymyr-chekyrta, I'll do that.

@mphilbrick211 mphilbrick211 added FC Relates to an Axim Funded Contribution project and removed waiting for eng review PR is ready for review. Review and merge it, or suggest changes. labels Jul 30, 2024
@volodymyr-chekyrta
Copy link
Contributor

@OmarIthawi, could you please tell me if PR is ready for the final pass?
I still see the uk file at OpenEdX/uk.lproj/Localizable.strings
image

@OmarIthawi OmarIthawi marked this pull request as draft August 7, 2024 13:07
@OmarIthawi
Copy link
Member Author

OmarIthawi commented Aug 7, 2024

Not ready yet @volodymyr-chekyrta. Still working on the last bit. Marked as draft accordingly.

@OmarIthawi OmarIthawi marked this pull request as ready for review August 8, 2024 14:53
@OmarIthawi
Copy link
Member Author

OmarIthawi commented Aug 8, 2024

@volodymyr-chekyrta, it's currently ready for testing.

I've used git diffs and it seemed okay. Please let me know if it looks good in XCode.

I see that we're still missing plurals and countries.json localization. So, let's see what can we improve and whether XCStrings would be used eventually after this pull request is merged 😅

Copy link
Contributor

@volodymyr-chekyrta volodymyr-chekyrta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@OmarIthawi
Copy link
Member Author

Thanks @volodymyr-chekyrta for the review.

I don't have merge access, I appreciate a merge to avoid future git conflics.

@volodymyr-chekyrta volodymyr-chekyrta merged commit 157ded7 into openedx:develop Aug 19, 2024
6 checks passed
@openedx-webhooks
Copy link

@OmarIthawi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants