-
-
Notifications
You must be signed in to change notification settings - Fork 132
Contributing to Cork
- Install the latest stable version of Xcode
- Get the Cork source code. Go here: https://github.com/buresdv/Cork#instructions, then scroll down to the section Compiling Cork. There, follow these steps:
- Installing Tuist and Its Prerequisites
- Compiling Cork (Steps 1, 2 and 3)
-
Open the top-level dropdown called "Cork", which has the App Store logo next to it, in the file browser in Xcode. Then open the
Project
sub-folder, thenCork
; you will see a bunch of folders -
Towards the bottom, there's a file called Localizable. Open it:
If it doesn't open, right-click (or Option-click) on it and select Open As -> String Catalog:
-
You will see a list of all languages:
-
At the bottom left of the central window section, click the + (plus) icon:
This will bring up a list of languages. Select the language you will be translating into -
The new language will appear in the list of languages. Click on it:
-
You will now see a few new columns; you should focus on the column Default Localization and (language you selected, in my case Czech).
-
Default Localization is the English original, which you can't edit. You have to put your translation into the (language you selected, in my case Czech) column:
-
Translate everything, and when you're done, do a PR!
Tip
Some strings are plurals; this means they can have different forms depending on whether the string has the quantity of "Zero", "One", "Two", "Plural", etc. depending on the language.
These are denoted by the dropdown icon; to localize them, expand them and localize all applicable items within. You can also add a quantity that's not present in English (for example, Slovene also has a Dual, along with Singular and Plural):
Cork uses SwiftLint to enforce basic coding style, along with SwiftFormat to automatically format your code. Both configuration files are included in the repo. Before you submit code, make sure your code does not introduce any new SwiftLint warnings. If you have SwiftFormat installed, I'd really appreciate if you ran it on your files with the included configuration file.
There are a few rules and tips regarding the submission of PRs:
- Always submit PRs to
main
- I might change the branch of your PR, depending on what your code adds or changes. Don't be alarmed, this is pretty usual