Commit 9aaf58de authored by Jonne Haß's avatar Jonne Haß Committed by GitHub

Merge pull request #6901 from svbergerem/remove-unused-translations

Remove unused translations
parents cb1bfc2b e0226f93
......@@ -285,7 +285,7 @@ app.views.Publisher = Backbone.View.extend({
var pollAnswersArray = _.flatten([serializedForm["poll_answers[]"]]);
var pollAnswers = _.map(pollAnswersArray, function(answer){
if (answer) {
return { "answer" : answer };
return {"answer": answer, "vote_count": 0};
}
});
pollAnswers = _.without(pollAnswers, undefined);
......
......@@ -20,12 +20,11 @@ Diaspora.I18n = {
updateLocale: function(locale, data) {
locale.data = $.extend(locale.data, data);
var rule = this._resolve(locale, ['pluralization_rule']);
if (rule !== "") {
/* jshint evil:true */
// TODO change this to `locale.pluralizationKey = rule`?
var rule = locale.data.pluralization_rule;
if (typeof rule !== "undefined") {
/* eslint-disable no-eval */
eval("locale.pluralizationKey = "+rule);
/* jshint evil:false */
/* eslint-enable no-eval */
}
},
......@@ -46,14 +45,9 @@ Diaspora.I18n = {
: locale.data[nextNamespace];
if(typeof translatedMessage === "undefined") {
if (typeof locale.fallback === "undefined") {
return "";
} else {
return this._resolve(locale.fallback, originalItems);
}
throw new Error("Missing translation: " + originalItems.join("."));
}
}
return translatedMessage;
},
......@@ -68,7 +62,7 @@ Diaspora.I18n = {
return _.template(this._resolve(locale, items))(views || {});
} catch (e) {
if (typeof locale.fallback === "undefined") {
return "";
throw e;
} else {
return this._render(locale.fallback, originalItems, views);
}
......@@ -86,4 +80,3 @@ Diaspora.I18n = {
}
};
// @license-end
<div class='pull-right'>
{{#if loggedIn}}
<a href="#" class="like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}">
<a href="#" class="like" title="{{#if userLike}} {{t "stream.unlike"}} {{else}} {{t "stream.like"}} {{/if}}">
{{#if userLike}}
<i class="entypo-heart red large"></i>
{{else}}
......@@ -8,12 +8,12 @@
{{/if}}
</a>
<a href="#" class="focus-comment" title="{{t "viewer.comment"}}">
<a href="#" class="focus-comment" title="{{t "stream.comment"}}">
<i class="entypo-comment gray large"></i>
</a>
{{#if userCanReshare}}
<a href="#" class="reshare" title="{{t "viewer.reshare"}}">
<a href="#" class="reshare" title="{{t "stream.reshare"}}">
<i class="entypo-reshare gray large"></i>
</a>
{{else}}
......
module LanguageHelper
include ApplicationHelper
def available_language_options
options = []
AVAILABLE_LANGUAGES.each do |locale, language|
......
......@@ -46,7 +46,7 @@
= text_field_tag "identifier", nil, class: "form-control"
.form-group
.clearfix.col-md-12
= submit_tag t("services.remote_friend.invite"), class: "btn btn-default pull-right"
= submit_tag t(".invite"), class: "btn btn-default pull-right"
.row
.col-md-12
......
%div
%select.aspect_dropdown.form-control.user_aspects{"name" => "user_aspects", "data-person-id" => @person.id}
%option{value: 'list_cover', class: 'list_cover', disabled: 'true', selected: 'true'}
= t("add_contact")
= t("contacts.index.add_contact")
- contact = current_user.contact_for(@person)
- current_user.aspects.each do |aspect|
- if contact.try(:in_aspect?, aspect)
......
......@@ -13,9 +13,9 @@
-if AppConfig.chat.enabled?
= link_to aspect_toggle_chat_privilege_path(@aspect), id: "chat_privilege_toggle", class: "contacts_button", method: :put, remote: true do
-if @aspect.chat_enabled?
%i.entypo-chat.enabled.contacts-header-icon{title: t("aspects.edit.aspect_chat_is_enabled")}
%i.entypo-chat.enabled.contacts-header-icon{title: t("javascripts.contacts.aspect_chat_is_enabled")}
-else
%i.entypo-chat.contacts-header-icon{title: t("aspects.edit.aspect_chat_is_not_enabled")}
%i.entypo-chat.contacts-header-icon{title: t("javascripts.contacts.aspect_chat_is_not_enabled")}
= link_to @aspect, method: "delete", data: { confirm: t("aspects.edit.confirm_remove_aspect") }, class: "delete contacts_button", id: "delete_aspect" do
%i.entypo-trash.contacts-header-icon{title: t("delete")}
......
......@@ -107,6 +107,8 @@ module Diaspora
}
config.action_mailer.asset_host = AppConfig.pod_uri.to_s
config.action_view.raise_on_missing_translations = true
config.middleware.use Rack::OAuth2::Server::Resource::Bearer, "OpenID Connect" do |req|
Api::OpenidConnect::OAuthAccessToken
.valid(Time.zone.now.utc).find_by(token: req.access_token) || req.invalid_token!
......
......@@ -21,9 +21,6 @@ en:
delete: "Delete"
hide: "Hide"
ignore: "Ignore"
undo: "Undo?"
or: "or"
ago: "%{time} ago"
username: "Username"
email: "Email"
password: "Password"
......@@ -39,8 +36,6 @@ en:
find_people: "Find people or #tags"
_home: "Home"
more: "More"
next: "Next"
previous: "Previous"
_comments: "Comments"
all_aspects: "All aspects"
no_results: "No results found"
......@@ -123,6 +118,7 @@ en:
account_locking_scheduled: "The account of %{name} is scheduled to be locked. It will be processed in a few moments..."
account_unlocking_scheduled: "The account of %{name} is scheduled to be unlocked. It will be processed in a few moments..."
email_to: "Email to invite"
invite: "Invite"
under_13: "Show users that are under 13 (COPPA)"
users:
zero: "%{count} users found"
......@@ -174,11 +170,6 @@ en:
tag_name: "Tag name: <b>%{name_tag}</b> Count: <b>%{count_tag}</b>"
pods:
pod_network: "Pod network"
application:
helper:
unknown_person: "Unknown person"
video_title:
unknown: "Unknown video title"
aspects:
contacts_visible: "Contacts in this aspect will be able to see each other."
contacts_not_visible: "Contacts in this aspect will not be able to see each other."
......@@ -191,12 +182,8 @@ en:
rename: "Rename"
aspect_list_is_visible: "Contacts in this aspect are able to see each other."
aspect_list_is_not_visible: "Contacts in this aspect are not able to see each other."
aspect_chat_is_enabled: "Contacts in this aspect are able to chat with you."
aspect_chat_is_not_enabled: "Contacts in this aspect are not able to chat with you."
update: "Update"
updating: "Updating"
no_posts_message:
start_talking: "Nobody has said anything yet!"
no_contacts_message:
you_should_add_some_more_contacts: "You should add some more contacts!"
try_adding_some_more_contacts: "You can search or %{invite_link} more contacts."
......@@ -233,13 +220,6 @@ en:
donate: "Donate"
keep_pod_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
keep_diaspora_running: "Keep diaspora* development fast with a monthly donation!"
no_tags: "+ Find a tag to follow"
unfollow_tag: "Stop following #%{tag}"
handle_explanation: "This is your diaspora* ID. Like an email address, you can give this to people to reach you."
no_contacts: "No contacts"
post_a_message: "Post a message >>"
people_sharing_with_you: "People sharing with you"
welcome_to_diaspora: "Welcome to diaspora*, %{name}!"
introduce_yourself: "This is your stream. Jump in and introduce yourself."
......@@ -265,10 +245,6 @@ en:
any_problem: "Got a problem?"
contact_podmin: "Contact the administrator of your pod!"
mail_podmin: "Podmin email"
diaspora_id:
heading: "diaspora* ID"
content_1: "Your diaspora* ID is:"
content_2: "Give it to anyone and they’ll be able to find you on diaspora*."
services:
heading: "Connect services"
content: "You can connect the following services to diaspora*:"
......@@ -311,11 +287,9 @@ en:
sharing:
people_sharing: "People sharing with you:"
index:
add_to_aspect: "Add contacts to %{name}"
start_a_conversation: "Start a conversation"
add_a_new_aspect: "Add a new aspect"
title: "Contacts"
your_contacts: "Your contacts"
no_contacts: "Looks like you need to add some contacts!"
no_contacts_message: "Check out %{community_spotlight}"
community_spotlight: "Community spotlight"
......@@ -334,12 +308,9 @@ en:
index:
conversations_inbox: "Conversations Inbox"
new_conversation: "New conversation"
no_conversation_selected: "No conversation selected"
create_a_new_conversation: "Start a new conversation"
no_messages: "No messages"
inbox: "Inbox"
conversation:
participants: "Participants"
show:
reply: "Reply"
replying: "Replying..."
......@@ -353,12 +324,6 @@ en:
message: "Message"
send: "Send"
sending: "Sending..."
abandon_changes: "Abandon changes?"
helper:
new_messages:
zero: "No new messages"
one: "1 new messages"
other: "%{count} new messages"
create:
sent: "Message sent"
fail: "Invalid message"
......@@ -624,25 +589,19 @@ en:
report_bugs: "report them"
invitation_codes:
excited: "%{name} is excited to see you here."
not_valid: "That invite code is no longer valid"
invitations:
create:
sent: "Invitations have been sent to: %{emails}"
rejected: "The following email addresses had problems: "
no_more: "You have no more invitations."
already_sent: "You already invited this person."
already_contacts: "You are already connected with this person"
own_address: "You can’t send an invitation to your own address."
empty: "Please enter at least one email address."
note_already_sent: "Invitations have already been sent to: %{emails}"
new:
language: "Language"
invite_someone_to_join: "Invite someone to join diaspora*!"
if_they_accept_info: "if they accept, they will be added to the aspect you invited them."
comma_separated_plz: "You can enter multiple email addresses separated by commas."
check_out_diaspora: "Hey! You should check out diaspora*"
to: "To"
personal_message: "Personal message"
send_an_invitation: "Send an invitation"
......@@ -653,15 +612,8 @@ en:
zero: "No invites left on this code"
one: "One invite left on this code"
other: "%{count} invites left on this code"
aspect: "Aspect"
already_invited: "The following people have not accepted your invitation:"
resend: "Resend"
check_out_diaspora: "Check out diaspora*!"
check_token:
not_found: "Invitation token not found"
edit:
your_account_awaits: "Your account awaits!"
accept_your_invitation: "Accept your invitation"
a_facebook_user: "A Facebook user"
layouts:
......@@ -670,7 +622,6 @@ en:
settings: "Settings"
help: "Help"
logout: "Log out"
blog: "Blog"
login: "Log in"
code: "Code"
admin: "Admin"
......@@ -693,14 +644,6 @@ en:
zero: "No likes"
one: "%{count} like"
other: "%{count} likes"
people_like_this_comment:
zero: "No likes"
one: "%{count} like"
other: "%{count} likes"
people_dislike_this:
zero: "No dislikes"
one: "%{count} dislike"
other: "%{count} dislikes"
notifications:
started_sharing:
......@@ -722,7 +665,7 @@ en:
mentioned:
zero: "%{actors} have mentioned you in the post %{post_link}."
one: "%{actors} has mentioned you in the post %{post_link}."
other: "%{actors} have mentioned you in the %{post_link}."
other: "%{actors} have mentioned you in the post %{post_link}."
liked:
zero: "%{actors} have liked your post %{post_link}."
one: "%{actors} has liked your post %{post_link}."
......@@ -942,9 +885,24 @@ en:
openid:
name: "basic profile"
description: "This allows the application to read your basic profile"
extended:
sub:
name: "sub"
description: "This grants sub permissions to the application"
aud:
name: "aud"
description: "This grants aud permissions to the application"
name:
name: "name"
description: "This grants name permissions to the application"
nickname:
name: "nickname"
description: "This grants nickname permissions to the application"
profile:
name: "extended profile"
description: "This allows the application to read your extended profile"
picture:
name: "picture"
description: "This grants picture permissions to the application"
read:
name: "read profile, stream and conversations"
description: "This allows the application to read your stream, your conversations and your complete profile"
......@@ -962,10 +920,7 @@ en:
one: "1 person"
other: "%{count} people"
person:
pending_request: "Pending request"
already_connected: "Already connected"
thats_you: "That’s you!"
add_contact: "Add contact"
index:
results_for: "Users matching %{search_term}"
no_results: "Hey! You need to search for something."
......@@ -979,54 +934,23 @@ en:
fail: "Sorry, we couldn’t find %{handle}."
show:
has_not_shared_with_you_yet: "%{name} has not shared any posts with you yet!"
incoming_request: "%{name} wants to share with you"
return_to_aspects: "Return to your aspects page"
to_accept_or_ignore: "to accept or ignore it."
does_not_exist: "Person does not exist!"
not_connected: "You are not sharing with this person"
recent_posts: "Recent posts"
recent_public_posts: "Recent public posts"
see_all: "See all"
start_sharing: "Start sharing"
message: "Message"
mention: "Mention"
closed_account: "This account has been closed."
sub_header:
you_have_no_tags: "You have no tags!"
add_some: "Add some"
edit: "Edit"
profile_sidebar:
remove_contact: "Remove contact"
edit_my_profile: "Edit my profile"
bio: "Bio"
location: "Location"
gender: "Gender"
born: "Birthday"
photos: "Photos"
in_aspects: "In aspects"
remove_from: "Remove %{name} from %{aspect}?"
helper:
results_for: " results for %{params}"
is_sharing: "%{name} is sharing with you"
is_not_sharing: "%{name} is not sharing with you"
aspect_list:
edit_membership: "Edit aspect membership"
add_contact_small:
add_contact_from_tag: "Add contact from tag"
add_contact:
invited_by: "You were invited by"
photos:
show:
delete_photo: "Delete photo"
make_profile_photo: "Make profile photo"
update_photo: "Update photo"
edit: "Edit"
edit_delete_photo: "Edit photo description / delete photo"
collection_permalink: "Collection permalink"
show_original_post: "Show original post"
edit:
editing: "Editing"
photo:
view_all: "View all of %{name}’s photos"
new:
......@@ -1037,9 +961,6 @@ en:
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
integrity_error: "Photo upload failed. Are you sure that was an image?"
type_error: "Photo upload failed. Are you sure an image was added?"
update:
notice: "Photo successfully updated."
error: "Failed to edit photo."
destroy:
notice: "Photo deleted."
new_photo:
......@@ -1048,8 +969,6 @@ en:
empty: "{file} is empty, please select files again without it."
new_profile_photo:
upload: "Upload a new profile photo!"
or_select_one_existing: "or select one from your already existing %{photos}"
comment_email_subject: "%{name}’s photo"
polls:
votes:
......@@ -1089,11 +1008,6 @@ en:
created: "A report was created"
failed: "Something went wrong"
share_visibilites:
update:
post_hidden_and_muted: "%{name}’s post has been hidden, and notifications have been muted."
see_it_on_their_profile: "If you want to see updates on this post, visit %{name}’s profile page."
profiles:
edit:
basic: "My basic profile"
......@@ -1128,11 +1042,6 @@ en:
registrations:
new:
create_my_account: "Create my account!"
join_the_movement: "Join the movement!"
sign_up_message: "Social networking with a ♥"
enter_email: "Enter your email address"
enter_username: "Pick a username (only letters, numbers, and underscores)"
enter_password: "Enter a password (six character minimum)"
......@@ -1147,43 +1056,16 @@ en:
terms_link: "terms of service"
create:
success: "You’ve joined diaspora*!"
edit:
edit: "Edit %{name}"
leave_blank: "(leave blank if you don’t want to change it)"
password_to_confirm: "(we need your current password to confirm your changes)"
unhappy: "Unhappy?"
update: "Update"
cancel_my_account: "Cancel my account"
closed: "Signups are closed on this diaspora* pod."
invalid_invite: "The invite link you provided is no longer valid!"
requests:
manage_aspect_contacts:
manage_within: "Manage contacts within"
existing: "Existing contacts"
destroy:
success: "You are now sharing."
error: "Please select an aspect!"
ignore: "Ignored contact request."
create:
sending: "Sending"
sent: "You’ve asked to share with %{name}. They should see it next time they log in to diaspora*."
new_request_to_person:
sent: "Sent!"
helper:
new_requests:
zero: "No new requests"
one: "New request!"
other: "%{count} new requests!"
reshares:
reshare:
reshared_via: "Reshared via"
reshare_original: "Reshare original"
reshare:
zero: "Reshare"
one: "1 reshare"
other: "%{count} reshares"
show_original: "Show original"
reshare_confirmation: "Reshare %{author}’s post?"
deleted: "Original post deleted by author."
create:
......@@ -1215,25 +1097,14 @@ en:
success: "Successfully deleted authentication."
failure:
error: "There was an error connecting to that service"
inviter:
join_me_on_diaspora: "Join me on diaspora*"
click_link_to_accept_invitation: "Follow this link to accept your invitation"
finder:
fetching_contacts: "diaspora* is populating your %{service} friends, please check back in a few minutes."
service_friends: "%{service} friends"
no_friends: "No Facebook friends found."
remote_friend:
resend: "Resend"
invite: "Invite"
not_on_diaspora: "Not yet on diaspora*"
blocks:
create:
success: "All right, you won’t see that user in your stream again. #silencio!"
failure: "I couldn’t ignore that user. #evasion"
failure: "I couldn’t ignore that user. #evasion"
destroy:
success: "Let’s see what they have to say! #sayhello"
failure: "I couldn’t stop ignoring that user. #evasion"
failure: "I couldn’t stop ignoring that user. #evasion"
shared:
aspect_dropdown:
......@@ -1249,16 +1120,12 @@ en:
posting: "Posting..."
share: "Share"
preview: "Preview"
post_a_message_to: "Post a message to %{aspect}"
make_public: "Make public"
all: "All"
upload_photos: "Upload photos"
get_location: "Get your location"
remove_location: "Remove location"
all_contacts: "All contacts"
share_with: "Share with"
whats_on_your_mind: "What’s on your mind?"
publishing_to: "Publishing to: "
discard_post: "Discard post"
new_user_prefill:
newhere: "newhere"
......@@ -1271,21 +1138,10 @@ en:
add_a_poll: "Add a poll"
question: "Question"
option: "Option 1"
add_contact:
enter_a_diaspora_username: "Enter a diaspora* username:"
your_diaspora_username_is: "Your diaspora* username is: %{diaspora_handle}"
create_request: "Find by diaspora* ID"
diaspora_handle: "diaspora@pod.org"
know_email: "Know their email address? You should invite them"
add_new_contact: "Add a new contact"
invitations:
invites: "Invites"
invite_someone: "Invite someone"
invitations_left: "%{count} left"
dont_have_now: "You don’t have any right now, but more invites are coming soon!"
invites_closed: "Invites are currently closed on this diaspora* pod"
invite_your_friends: "Invite your friends"
from_facebook: "From Facebook"
by_email: "By email"
share_this: "Share this link via email, blog, or social networks!"
reshare:
......@@ -1300,14 +1156,7 @@ en:
logged_in: "Logged in to %{service}"
manage: "Manage connected services"
atom_feed: "Atom feed"
notification:
new: "New %{type} from %{from}"
contact_list:
all_contacts: "All contacts"
stream_element:
viewable_to_anyone: "This post is viewable to anyone on the web"
connect_to_comment: "Connect to this user to comment on their post"
currently_unavailable: "Commenting currently unavailable"
via: "Via %{link}"
via_mobile: "Via mobile"
ignore_user: "Ignore %{name}"
......@@ -1315,20 +1164,12 @@ en:
hide_and_mute: "Hide and mute post"
like: "Like"
unlike: "Unlike"
dislike: "Dislike"
shared_with: "Shared with: %{aspect_names}"
nsfw: "This post has been flagged as NSFW by its author. %{link}"
show: "Show"
footer:
logged_in_as: "Logged in as %{name}"
your_aspects: "Your aspects"
status_messages:
new: