Update translations (#1172)

* Update translations (4 new translations!)

*New Translations*

- Persian (fa) (100%)
- Indonesian (id) (82%)
- Macedonian (Macedonia) (mk_MK) 100%
- Shona (sn) 98%

Inluded a script to pull translations that are >=80% complete

80% is completely arbitrary, but nicely bisects the current translation
efforts which fall into buckets of "over 80%" and "under 50%."

// FREEBIE

* final tx pull before push source

//FREEBIE

* tx pull, after updating source (plus some eager beavers already pushed new translations)

iStringVerify passes

* Make "add person" label more i18n flexible

This accommodates (e.g.) Italian, which was being truncated.

// FREEBIE

* Galician localization

Moitas grazas xesusmosquera!

// FREEBIE

* i18n for Unarchive action

started leaving hints for our translators. These are currently manually
redundantly duplicated in the source/strings file, in hopes of a more
automated future with genstrings.

// FREEBIE

* include iStringsVerify check in update-translations script

and pull latest translations after including UNARCHIVE action
// FREEBIE

* i18n GROUP_MEMBERS_HEADER

//FREEBIE

* pull translations
This commit is contained in:
Michael Kirk 2016-05-08 17:17:37 -07:00
parent 7f022404d1
commit 496f8117f9
44 changed files with 95 additions and 12 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="tuk-0x-yCb">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="tuk-0x-yCb">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
@ -1715,7 +1715,7 @@ A0 09 9A FF A8 8A 09 99</string>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukg-om-VX3">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukg-om-VX3" userLabel="Group Details">
<rect key="frame" x="0.0" y="20" width="320" height="100"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ul8-NY-i4c">
@ -1753,12 +1753,12 @@ A0 09 9A FF A8 8A 09 99</string>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsMultipleSelection="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="cFo-AT-Srf">
<rect key="frame" x="0.0" y="128" width="320" height="440"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="ekO-kw-iHV">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="ekO-kw-iHV" userLabel="Header View">
<rect key="frame" x="0.0" y="0.0" width="320" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add people:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="daD-wf-IGn">
<rect key="frame" x="10" y="274" width="130" height="20.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add people:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="daD-wf-IGn">
<rect key="frame" x="10" y="10" width="98.5" height="20.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -1767,13 +1767,13 @@ A0 09 9A FF A8 8A 09 99</string>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="daD-wf-IGn" firstAttribute="leading" secondItem="ekO-kw-iHV" secondAttribute="leading" constant="10" id="00e-AP-Ygd"/>
<constraint firstAttribute="trailing" secondItem="daD-wf-IGn" secondAttribute="trailing" constant="180" id="Gtz-Dx-9U1"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="daD-wf-IGn" secondAttribute="trailing" constant="10" id="Gtz-Dx-9U1"/>
<constraint firstAttribute="centerY" secondItem="daD-wf-IGn" secondAttribute="centerY" id="biL-jB-cMW"/>
</constraints>
</view>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="GroupSearchCell" textLabel="a4j-OQ-ala" rowHeight="60" style="IBUITableViewCellStyleDefault" id="yfF-Jl-bZ1">
<rect key="frame" x="0.0" y="590" width="320" height="60"/>
<rect key="frame" x="0.0" y="62" width="320" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yfF-Jl-bZ1" id="f0v-od-N9K">
<rect key="frame" x="0.0" y="0.0" width="320" height="59.5"/>

View file

@ -90,7 +90,7 @@ static NSString *const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue"
cell.textLabel.text = [self.groupContacts identifierForIndexPath:relativeIndexPath];
}
} else {
cell.textLabel.text = @"Group Members:";
cell.textLabel.text = NSLocalizedString(@"GROUP_MEMBERS_HEADER", @"header for table which lists the members of this group thread");
cell.textLabel.textColor = [UIColor lightGrayColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}

View file

@ -217,7 +217,7 @@ static NSString *const kShowSignupFlowSegue = @"showSignupFlow";
if (self.viewingThreadsIn == kInboxState) {
archiveAction = [UITableViewRowAction
rowActionWithStyle:UITableViewRowActionStyleNormal
title:NSLocalizedString(@"ARCHIVE_ACTION", nil)
title:NSLocalizedString(@"ARCHIVE_ACTION", @"Pressing this button moves a thread from the inbox to the archive")
handler:^(UITableViewRowAction *_Nonnull action, NSIndexPath *_Nonnull tappedIndexPath) {
[self archiveIndexPath:tappedIndexPath];
[Environment.preferences setHasArchivedAMessage:YES];
@ -226,7 +226,7 @@ static NSString *const kShowSignupFlowSegue = @"showSignupFlow";
} else {
archiveAction = [UITableViewRowAction
rowActionWithStyle:UITableViewRowActionStyleNormal
title:@"Unarchive"
title:NSLocalizedString(@"UNARCHIVE_ACTION", @"Pressing this button moves an archived thread from the archive back to the inbox")
handler:^(UITableViewRowAction *_Nonnull action, NSIndexPath *_Nonnull tappedIndexPath) {
[self archiveIndexPath:tappedIndexPath];
}];

View file

@ -0,0 +1,58 @@
# Translations
Translations are solicited on Transifex[https://www.transifex.com/]. We
upload our source language (US English) to Transifex, where our
translators can submit their translations. Before the app is released,
we pull their latest work into the code base.
### Fetch
You should always fetch the latest translations before pushing new
source translations, as any newly updated source strings will blow away
the existing translated strings. Generally when a source string is
updated, it's preferred to have the previous translation vs an english
string.
To fetch the latest translations:
bin/pull-translations
This imposes some limits on what localizations we include. For example,
we don't want to include languages until a substantial portion of the
app has been translated.
### Managing Source Strings
There is currently no automated way to extract our localized strings.
Instead developers keep our [source strings file](translations/en.lproj/Localized.strings)
up to date manually as we change strings in the code base.
Be sure to add a comment to provide context to the translators. For
example:
/* Tab button label which takes you to view all your archived conversations */
ARCHIVE_HEADER="Archive"
/* Button label to archive the current conversation */
ARCHIVE_ACTION="Archive"
Why comment? For example, in English these are the same, but in (e.g.)
Finnish the noun/verb are distinct.
/* Tab button label which takes you to view all your archived conversations */
ARCHIVE_HEADER="Arkisto"
/* Button label to archive the current conversation */
ARCHIVE_ACTION="Arkistoi"
Context should also provide a hint as to how much text should be
provided. For example, is it an alert title, which can be a few words, a
button, which must be *very* short, or an alert message, which can be a
little longer?
### Upload
Make new source strings available to our translators by uploading them
to transifex. Make sure you've fetched the latest translations first,
otherwise you could overwrite some useful translations on Transifex.
tx push --source

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -x
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $BIN_DIR/..
# Pull all translations which are at least 80% complete
tx pull -a --minimum-perc=80
# Legacy hack: pull *any existing* translations regardless of their completion.
# Once supported, we don't want to drop any translations.
tx pull
# Get and build iStringsCheck from https://github.com/FredericJacobs/iStringsCheck
# This does some checks to make sure all strings are present and that interpolated strings have the right number of arguments
../../../iStringsCheck/target/debug/iStringsCheck en.lproj/Localizable.strings .

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -x
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $BIN_DIR/..
tx push --source

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.