Skip to content

Getting Started

CMasterson edited this page Aug 17, 2023 · 4 revisions

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.

Setup Secrets

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.

Tests

Similarly, we have a secrets file for testing. From the root directory in Terminal run:
cp Config/secrets.xcconfig.example Config/secrets_test.xcconfig

Localization

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.

Adding Strings

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:

  1. Ensure you have swiftgen installed (brew install swiftgen)
  2. 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.
  3. Either a) Build the project or b) run swiftgen from the root of the Pocket project directory
  4. The new string enum should be available in the Localization enum for you to use.
  5. Once your PR lands in develop watch as Smartling will pick it up and translate it.

Exclusions

In general we want to avoid localizing feature names. "Collections" is a prime example.

Clone this wiki locally