-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
A fresh clone of the repository will not build. There are a few things we need to do before we can start writing awesome code.
We provide a set of example secrets that need to be copied into a .xcconfig file.
From the root directory in Terminal run:
cp Config/secrets.xcconfig.example Config/secrets.xcconfig
The app will now build, but you will be unable to log in. We are working to resolve this issue for Open source Contributors.
Similarly, we have a secrets file for testing.
From the root directory in Terminal run:
cp Config/secrets.xcconfig.example Config/secrets_test.xcconfig
Pocket localization is handled by Smartling. The project is currently setup in Single Branch Mode against the develop
branch. Everytime a commit is made to develop
Smartling will analyze the branch and determine if it needs to start a translation job.
If it does, it will begin automatically and make a PR back against the repo with the needed translations.
Occasionally our translators may have a question or need some alterations to unblock their work. You can check in the Smartling Dashboard for these queries.
Pocket uses swiftgen to generate a Strings.swift file from our English Localizable.strings file.
Moving forward we will use a reverse dns pattern for String keys.
e.g. "search.results.empty.header" = "No results found";
To make a new string follow the following steps:
- Ensure you have
swiftgen
installed (brew install swiftgen
) - Add your string to Localizable.strings Note: If you add a comment above the string, it will be included for the Smartling translators and is useful if a word translated has different transalations based on the usage.
- Either a) Build the project or b) run
swiftgen
from the root of the Pocket project directory - The new string enum should be available in the
Localization
enum for you to use. - Once your PR lands in
develop
watch as Smartling will pick it up and translate it.
In general we want to avoid localizing feature names. "Collections" is a prime example.