You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/10/21 01:55:07 UTC
git commit: CB-7597 - Localizable.strings for Media Capture are in
the default template, it should be in the plugin
Repository: cordova-plugin-media-capture
Updated Branches:
refs/heads/master b16eb2367 -> f7d70e2e8
CB-7597 - Localizable.strings for Media Capture are in the default template, it should be in the plugin
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/f7d70e2e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/f7d70e2e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/f7d70e2e
Branch: refs/heads/master
Commit: f7d70e2e8f8354743286011f70dcd79a3292a82e
Parents: b16eb23
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Oct 20 16:55:04 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Oct 20 16:55:04 2014 -0700
----------------------------------------------------------------------
.../de.lproj/Localizable.strings | 28 ++++++++++++++++++++
.../en.lproj/Localizable.strings | 27 +++++++++++++++++++
.../es.lproj/Localizable.strings | 27 +++++++++++++++++++
.../se.lproj/Localizable.strings | 28 ++++++++++++++++++++
src/ios/CDVCapture.m | 16 ++++++++---
5 files changed, 123 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings
new file mode 100644
index 0000000..945cbc4
--- /dev/null
+++ b/src/ios/CDVCapture.bundle/de.lproj/Localizable.strings
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+
+// controller title for Videos
+"Videos title" = "Videos";
+// accessibility label for recording button
+"toggle audio recording" = "starten/beenden der Tonaufnahme";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "programmierte Aufnahme beendet";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden";
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings
new file mode 100644
index 0000000..a4a049e
--- /dev/null
+++ b/src/ios/CDVCapture.bundle/en.lproj/Localizable.strings
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+// controller title for Videos
+"Videos title" = "Videos";
+// accessibility label for recording button
+"toggle audio recording" = "toggle audio recording";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "timed recording complete";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "recorded time in minutes and seconds";
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/es.lproj/Localizable.strings
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.bundle/es.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/es.lproj/Localizable.strings
new file mode 100644
index 0000000..ceade1a
--- /dev/null
+++ b/src/ios/CDVCapture.bundle/es.lproj/Localizable.strings
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+// controller title for Videos
+"Videos title" = "Videos";
+// accessibility label for recording button
+"toggle audio recording" = "grabación de audio cambiar";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "tiempo de grabación completo";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos";
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.bundle/se.lproj/Localizable.strings
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.bundle/se.lproj/Localizable.strings b/src/ios/CDVCapture.bundle/se.lproj/Localizable.strings
new file mode 100644
index 0000000..aee034d
--- /dev/null
+++ b/src/ios/CDVCapture.bundle/se.lproj/Localizable.strings
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+
+// controller title for Videos
+"Videos title" = "Videor";
+// accessibility label for recording button
+"toggle audio recording" = "börja/avsluta inspelning";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "inspelning har avslutad";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "inspelad tid in minuter och sekund";
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/f7d70e2e/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 060b935..9ecefb7 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -29,6 +29,16 @@
#define kW3CMediaFormatDuration @"duration"
#define kW3CMediaModeType @"type"
+@implementation NSBundle (PluginExtensions)
+
++ (NSBundle*) pluginBundle:(CDVPlugin*)plugin {
+ NSBundle* bundle = [NSBundle bundleWithPath: [[NSBundle mainBundle] pathForResource:NSStringFromClass([plugin class]) ofType: @"bundle"]];
+ return bundle;
+}
+@end
+
+#define PluginLocalizedString(plugin, key, comment) [[NSBundle pluginBundle:(plugin)] localizedStringForKey:(key) value:nil table:nil]
+
@implementation CDVImagePicker
@synthesize quality;
@@ -642,7 +652,7 @@
[self.timerLabel setTextAlignment:UITextAlignmentCenter];
#endif
[self.timerLabel setText:@"0:00"];
- [self.timerLabel setAccessibilityHint:NSLocalizedString(@"recorded time in minutes and seconds", nil)];
+ [self.timerLabel setAccessibilityHint:PluginLocalizedString(captureCommand, @"recorded time in minutes and seconds", nil)];
self.timerLabel.accessibilityTraits |= UIAccessibilityTraitUpdatesFrequently;
self.timerLabel.accessibilityTraits &= ~UIAccessibilityTraitStaticText;
[tmp addSubview:self.timerLabel];
@@ -653,7 +663,7 @@
self.stopRecordImage = [UIImage imageNamed:[self resolveImageResource:@"CDVCapture.bundle/stop_button"]];
self.recordButton.accessibilityTraits |= [self accessibilityTraits];
self.recordButton = [[UIButton alloc] initWithFrame:CGRectMake((viewRect.size.width - recordImage.size.width) / 2, (microphone.size.height + (grayBkg.size.height - recordImage.size.height) / 2), recordImage.size.width, recordImage.size.height)];
- [self.recordButton setAccessibilityLabel:NSLocalizedString(@"toggle audio recording", nil)];
+ [self.recordButton setAccessibilityLabel:PluginLocalizedString(captureCommand, @"toggle audio recording", nil)];
[self.recordButton setImage:recordImage forState:UIControlStateNormal];
[self.recordButton addTarget:self action:@selector(processButton:) forControlEvents:UIControlEventTouchUpInside];
[tmp addSubview:recordButton];
@@ -809,7 +819,7 @@
BOOL isUIAccessibilityAnnouncementNotification = (&UIAccessibilityAnnouncementNotification != NULL);
if (isUIAccessibilityAnnouncementNotification) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 500ull * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
- UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(@"timed recording complete", nil));
+ UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, PluginLocalizedString(captureCommand, @"timed recording complete", nil));
});
}
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org