From 39955811b952cc7a2f37201faeb38eeb3a239636 Mon Sep 17 00:00:00 2001 From: ianegordon Date: Thu, 23 Aug 2018 14:45:07 -0400 Subject: [PATCH 1/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e8c6d2..ec8f118 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ if (customView.mdf_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayou } ``` -## Embedding Bidirection strings +## Embedding Bi-directional strings A category on NSString offers a simple API to wrap strings in Unicode markers so that LTR and RTL text can co-exist in the same string. @@ -56,7 +56,7 @@ and RTL text can co-exist in the same string. // To embed an RTL string in an existing LTR string we should wrap it in Unicode directionality // markers to maintain preoper rendering. -// The name of a restaurant is in Arabic or Hebrew script, but the rest of string is in Latin. +// The name of a restaurant is in Arabic (RTL), but the rest of string is in Latin (LTR). NSString *wrappedRestaurantName = [restaurantName mdf_stringWithStereoReset:NSLocaleLanguageDirectionRightToLeft context:NSLocaleLanguageDirectionLeftToRight]; From eb2107d3208f045d6464115f3cb5453d06a9c243 Mon Sep 17 00:00:00 2001 From: Ian Gordon Date: Thu, 8 Nov 2018 12:15:35 -0800 Subject: [PATCH 2/7] Update to latest Xcode --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ Examples/Flags/Flags.xcodeproj/project.pbxproj | 6 +++++- .../Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme | 4 +--- .../xcshareddata/xcschemes/FlagsUITests.xcscheme | 4 +--- MDFInternationalization.xcodeproj/project.pbxproj | 6 +++++- .../xcschemes/MDFInternationalization.xcscheme | 4 +--- .../xcschemes/MDFInternationalizationTests.xcscheme | 8 +++----- 7 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 Examples/Flags.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/Flags.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/Flags.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Examples/Flags.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Examples/Flags/Flags.xcodeproj/project.pbxproj b/Examples/Flags/Flags.xcodeproj/project.pbxproj index 6ac5a44..f0a744a 100644 --- a/Examples/Flags/Flags.xcodeproj/project.pbxproj +++ b/Examples/Flags/Flags.xcodeproj/project.pbxproj @@ -227,7 +227,7 @@ 4096E61E1D78ED7600389ECD /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = Google; TargetAttributes = { 4096E6251D78ED7600389ECD = { @@ -371,12 +371,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -426,12 +428,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/Examples/Flags/Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme b/Examples/Flags/Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme index 8df1d09..ea51a1c 100644 --- a/Examples/Flags/Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme +++ b/Examples/Flags/Flags.xcodeproj/xcshareddata/xcschemes/Flags.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -32,7 +31,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 3ec6a305948a1bdac426e10811afbec691065341 Mon Sep 17 00:00:00 2001 From: featherless Date: Tue, 20 Nov 2018 13:38:26 -0500 Subject: [PATCH 3/7] Integrate clang-format-ci. (#45) --- .clang-format-ci | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 58 insertions(+) create mode 100755 .clang-format-ci diff --git a/.clang-format-ci b/.clang-format-ci new file mode 100755 index 0000000..1737485 --- /dev/null +++ b/.clang-format-ci @@ -0,0 +1,57 @@ +#!/bin/bash +# +# Copyright 2018-present The Material Foundation Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Fail on any error. +set -e + +REPO="material-foundation/material-internationalization-ios" + +# The tagged version of https://github.com/material-foundation/clang-format-ci to check out. +# A * wildcard can be used to check out the latest release of a given version. +CLANG_FORMAT_CI_VERSION="v1.*" + +CLANG_FORMAT_CI_SRC_DIR=".clang-format-ci-src" + +# Will run git clang-format on the branch's changes, reporting a failure if the linter generated any +# stylistic changes. +# +# For local runs, you must set the following environment variables: +# +# GITHUB_API_TOKEN -> Create a token here: https://github.com/settings/tokens. +# Must have public_repo scope. +# KOKORO_GITHUB_PULL_REQUEST_NUMBER="###" -> The PR # you want to post the API diff results to. +# KOKORO_GITHUB_PULL_REQUEST_COMMIT="..." -> The PR commit you want to post to. +# +# And install the following tools: +# +# - clang-format +# - git-clang-format +lint_clang_format() { + if [ ! -d "$CLANG_FORMAT_CI_SRC_DIR" ]; then + git clone --recurse-submodules https://github.com/material-foundation/clang-format-ci.git "$CLANG_FORMAT_CI_SRC_DIR" + fi + + pushd "$CLANG_FORMAT_CI_SRC_DIR" + git fetch > /dev/null + TAG=$(git tag --sort=v:refname -l "$CLANG_FORMAT_CI_VERSION" | tail -n1) + git checkout "$TAG" > /dev/null + echo "Using clang-format-ci $TAG" + popd + + .clang-format-ci-src/from-kokoro.sh "$REPO" +} + +lint_clang_format diff --git a/.gitignore b/.gitignore index 81a3fe3..ac7f13a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ bazel-* .kokoro-ios-runner +.clang-format-ci-src # Xcode # From 580082c633f1e1146fd0634f02dcf39270c5375a Mon Sep 17 00:00:00 2001 From: featherless Date: Thu, 29 Nov 2018 22:53:13 -0500 Subject: [PATCH 4/7] Add MDFInternationalizationFrameworkHeaders as a dependency for bazel. (#47) This ensures that the library can be built with bazel simply by depending on MDFInternationalization and while using framework-style imports. This change is required for https://github.com/material-components/material-components-ios/pull/5550 --- BUILD | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index e24e34d..5a8d707 100644 --- a/BUILD +++ b/BUILD @@ -37,6 +37,9 @@ strict_warnings_objc_library( enable_modules = 1, includes = ["Sources"], visibility = ["//visibility:public"], + deps = [ + ":MDFInternationalizationFrameworkHeaders", + ], ) apple_framework_relative_headers( @@ -52,7 +55,10 @@ objc_library( srcs = glob([ "Tests/*.m", ]), - deps = [":MDFInternationalization", ":MDFInternationalizationFrameworkHeaders"], + deps = [ + ":MDFInternationalization", + ":MDFInternationalizationFrameworkHeaders", + ], visibility = ["//visibility:private"], ) From 177e1d35fd8247b669bbd415364d894e1b09c8e7 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 3 Dec 2018 09:12:25 -0500 Subject: [PATCH 5/7] Automatic changelog preparation for release. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e65775..a9e407e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# #develop# + + TODO: Enumerate changes. + + # 1.1.0 * [Add Bidi utilities (#42)](https://github.com/material-foundation/material-internationalization-ios/pull/42) (Ian Gordon) From ae909b5189541f934d416b8feb273b1755b17303 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 3 Dec 2018 09:36:52 -0500 Subject: [PATCH 6/7] Update changelog. --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9e407e..48cae20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -# #develop# - - TODO: Enumerate changes. +# 1.1.1 +* [Add MDFInternationalizationFrameworkHeaders as a dependency for bazel. (#47)](https://github.com/material-foundation/material-internationalization-ios/commit/580082c633f1e1146fd0634f02dcf39270c5375a) (featherless) +* [Integrate clang-format-ci. (#45)](https://github.com/material-foundation/material-internationalization-ios/commit/3ec6a305948a1bdac426e10811afbec691065341) (featherless) +* [Update to latest Xcode](https://github.com/material-foundation/material-internationalization-ios/commit/eb2107d3208f045d6464115f3cb5453d06a9c243) (Ian Gordon) +* [Update README.md](https://github.com/material-foundation/material-internationalization-ios/commit/39955811b952cc7a2f37201faeb38eeb3a239636) (ianegordon) # 1.1.0 From 54c36c9a7297066a4aa506d7756fd1d85f3e9e6b Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 3 Dec 2018 09:37:19 -0500 Subject: [PATCH 7/7] Bump the release. --- MDFInternationalization.podspec | 2 +- Sources/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MDFInternationalization.podspec b/MDFInternationalization.podspec index 2bce305..99812fd 100644 --- a/MDFInternationalization.podspec +++ b/MDFInternationalization.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MDFInternationalization" - s.version = "1.1.0" + s.version = "1.1.1" s.authors = "The Material Foundation Authors" s.summary = "Internationalization tools." s.homepage = "https://github.com/material-foundation/material-internationalization-ios" diff --git a/Sources/Info.plist b/Sources/Info.plist index 09bc972..c6f194e 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.0 + 1.1.1 CFBundleSignature ???? CFBundleVersion