Update strings for mobile apps

When asked to update strings, error messages, labels, etc. for the edX mobile apps, these instructions might be useful. akivaR (Deactivated) is the SME!

Step-by-step guide

  1. Clone the edx-app-ios and edx-app-android repos to your local machine, or sync them to the latest version.
  2. Add a branch. Most likely, you'll need a branch for each app to keep them in sync.
  3. For ios, you edit edx-app-ios/Source/en.lproj/localizable.strings.
    For android, you edit edx-app-android/VideoLocker/res/values/strings.xml, errors.xml, or labels.xml.
  4. While the files use different syntax, they are similarly set up, with a key name (aka string name) on the left paired with the string, label, etc. on the right. You edit the string, but do NOT change the key name.
  5. Each key::value pair has a comment on the line above. For ios, the syntax is /* comment */, for Android it's <!-- comment -->. These comments are used by translators, so you might need to edit them to make the purpose of a control clear.
  6. If a string needs both sigular and plural formulations, there is syntax in each file to adjust to the actual count and provide the correct string. In both files, "one" is separated from "others", as follows.

    • ios: 
      /* Text of alert when confirming video deletion */
      "CONFIRM_DELETE_MESSAGE##{one}"="Are you sure you want to delete this video?";
      /* Text of alert when confirming video deletion */
      "CONFIRM_DELETE_MESSAGE##{other}"="Are you sure you want to delete these videos?"; 

       

    • Android:
      <!-- Confirmation text for delete video dialog -->
      <string name="delete_dialog_title_help">Confirm Delete</string>
      <plurals name="delete_video_dialog_msg">
      <item quantity="one">Are you sure you want to delete this video?</item>
      <item quantity="other">Are you sure you want to delete these videos?</item>
      </plurals>