From 756dd65905e649f975076a87368854ead66bb421 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 4 Dec 2014 13:53:33 +0100 Subject: [PATCH] Added place holder text to room input. --- src/i18n/messages-de.po | 7 +++++-- src/i18n/messages-ja.po | 6 +++++- src/i18n/messages-ko.po | 6 +++++- src/i18n/messages-zh-cn.po | 6 +++++- src/i18n/messages-zh-tw.po | 6 +++++- src/i18n/messages.pot | 5 ++++- static/js/directives/welcome.js | 10 ++++++---- static/partials/page/welcome.html | 4 ++-- static/translation/messages-de.json | 2 +- 9 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/i18n/messages-de.po b/src/i18n/messages-de.po index 68006047..61056095 100644 --- a/src/i18n/messages-de.po +++ b/src/i18n/messages-de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" -"PO-Revision-Date: 2014-12-04 12:41+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" +"PO-Revision-Date: 2014-12-04 13:52+0100\n" "Last-Translator: Simon Eisenmann \n" "Language-Team: struktur AG \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -698,6 +698,9 @@ msgstr "Browsereinstellung" msgid "Meet with me here:" msgstr "Meeting:" +msgid "Room name" +msgstr "Raum-Name" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "Unbekanntes URL-Format. Bitte geben Sie eine gültige YouTube URL ein." diff --git a/src/i18n/messages-ja.po b/src/i18n/messages-ja.po index 4ae05fc5..3322c937 100644 --- a/src/i18n/messages-ja.po +++ b/src/i18n/messages-ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" "PO-Revision-Date: 2014-04-23 22:25+0100\n" "Last-Translator: Curt Frisemo \n" "Language-Team: Curt Frisemo \n" @@ -679,6 +679,10 @@ msgstr "ブラウザの言語を使用" msgid "Meet with me here:" msgstr "ここで私と会う:" +#, fuzzy +msgid "Room name" +msgstr "あなたの名前" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "" diff --git a/src/i18n/messages-ko.po b/src/i18n/messages-ko.po index 85546eaf..a07c97d2 100644 --- a/src/i18n/messages-ko.po +++ b/src/i18n/messages-ko.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" "PO-Revision-Date: 2014-04-13 20:30+0900\n" "Last-Translator: Curt Frisemo \n" "Language-Team: Curt Frisemo \n" @@ -679,6 +679,10 @@ msgstr "브라우저 언어 사용" msgid "Meet with me here:" msgstr "나를 여기서 만납니다:" +#, fuzzy +msgid "Room name" +msgstr "사용자 이름" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "" diff --git a/src/i18n/messages-zh-cn.po b/src/i18n/messages-zh-cn.po index 4a351fe0..2824d4df 100644 --- a/src/i18n/messages-zh-cn.po +++ b/src/i18n/messages-zh-cn.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" "PO-Revision-Date: 2014-05-21 09:54+0800\n" "Last-Translator: Michael P.\n" "Language-Team: Curt Frisemo \n" @@ -678,6 +678,10 @@ msgstr "使用浏览器语言" msgid "Meet with me here:" msgstr "我们这里见:" +#, fuzzy +msgid "Room name" +msgstr "您的名字" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "" diff --git a/src/i18n/messages-zh-tw.po b/src/i18n/messages-zh-tw.po index 363eac80..772299d2 100644 --- a/src/i18n/messages-zh-tw.po +++ b/src/i18n/messages-zh-tw.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" "PO-Revision-Date: 2014-05-21 09:55+0800\n" "Last-Translator: Michael P.\n" "Language-Team: Curt Frisemo \n" @@ -678,6 +678,10 @@ msgstr "使用瀏覽器語言" msgid "Meet with me here:" msgstr "我們這裡見:" +#, fuzzy +msgid "Room name" +msgstr "您的名字" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "" diff --git a/src/i18n/messages.pot b/src/i18n/messages.pot index 82baa410..a9e11cea 100644 --- a/src/i18n/messages.pot +++ b/src/i18n/messages.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Spreed WebRTC 1.0\n" "Report-Msgid-Bugs-To: simon@struktur.de\n" -"POT-Creation-Date: 2014-12-04 12:36+0100\n" +"POT-Creation-Date: 2014-12-04 13:52+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -668,6 +668,9 @@ msgstr "" msgid "Meet with me here:" msgstr "" +msgid "Room name" +msgstr "" + msgid "Unknown URL format. Please make sure to enter a valid YouTube URL." msgstr "" diff --git a/static/js/directives/welcome.js b/static/js/directives/welcome.js index aa35c3e7..853ff9ed 100644 --- a/static/js/directives/welcome.js +++ b/static/js/directives/welcome.js @@ -23,11 +23,13 @@ define([], function() { // welcome - return ["rooms", "$timeout", "mediaStream", function(rooms, $timeout, mediaStream) { + return ["rooms", "$timeout", "mediaStream", "translation", function(rooms, $timeout, mediaStream, translation) { function link($scope, $element) { //console.log("xxx welcome", $scope.$id, $element); + var placeHolder = translation._("Room name"); + $scope.randomRoom = rooms.randomRoom; $scope.canCreateRooms = rooms.canCreateRooms; $scope.joinRoomByName = function(name) { @@ -42,9 +44,9 @@ define([], function() { var roomdata = rooms.getRandomRoom(); if (roomdata) { - $scope.roomdata = {name: roomdata.name} + $scope.roomdata = {name: roomdata.name, placeholder: roomdata.name ? roomdata.name : placeHolder} } else { - $scope.roomdata = {}; + $scope.roomdata = {placeholder: placeHolder}; } $scope.roomdataInput = { @@ -64,7 +66,7 @@ define([], function() { }); $scope.$on("room.random", function(event, roomdata) { - $scope.roomdata = {name: roomdata.name, last: roomdata.name}; + $scope.roomdata = {name: roomdata.name, last: roomdata.name, placeholder: roomdata.name ? roomdata.name : placeHolder}; $scope.roomdataInput.name = ""; }); diff --git a/static/partials/page/welcome.html b/static/partials/page/welcome.html index e0862287..e979ce7b 100644 --- a/static/partials/page/welcome.html +++ b/static/partials/page/welcome.html @@ -3,14 +3,14 @@

{{_("Enter a room name")}}

- +
- +

This room name can not be used. Please choose another name.