adding custom package

This commit is contained in:
Sacha Greif 2013-11-21 11:32:09 +09:00
parent ef537c4987
commit 0cc4ca1bbb
10 changed files with 213 additions and 217 deletions

View file

@ -18,4 +18,4 @@ rss
iron-router
mailchimp
nprogress
i18next-meteor
telescope-i18n

View file

@ -49,8 +49,3 @@ Handlebars.registerHelper('canEdit', function(collectionName, item, action) {
// var item=collection.findOne(itemId);
return item && canEdit(Meteor.user(), item, action);
});
Handlebars.registerHelper('i18n',
function(str){
// return ($.i18n != undefined ? $.i18n.t(str) : str);
}
);

View file

@ -18,16 +18,6 @@ Meteor.subscribe('settings', function(){
// runs once after settings have loaded
Session.set('settingsLoaded',true);
analyticsInit();
i18n = $.i18n;
// Localisation
i18n.init({
lng: getSetting("language"),
resStore: eval(getSetting("language")),
keyseparator: '::',
nsseparator: ':::'
});
});
// Categories

View file

@ -18,7 +18,7 @@ getNotification = function(event, properties, context){
case 'newReply':
notification.subject = i18n.t('Someone replied to your comment on')+' "'+p.postHeadline+'"';
notification.text = p.commentAuthorName+i18n.t(' has replied to your comment on')+' "'+p.postHeadline+'": '+getPostCommentUrl(p.postId, p.commentId);
notification.html = '<p><a href="'+getUserUrl(p.commentAuthorId)+'">'+p.commentAuthorName+'</a>'.i18n.t(' has replied to your comment on')+' "<a href="'+getPostCommentUrl(p.postId, p.commentId)+'" class="action-link">'+p.postHeadline+'</a>"</p>';
notification.html = '<p><a href="'+getUserUrl(p.commentAuthorId)+'">'+p.commentAuthorName+'</a>'+i18n.t(' has replied to your comment on')+' "<a href="'+getPostCommentUrl(p.postId, p.commentId)+'" class="action-link">'+p.postHeadline+'</a>"</p>';
if(context === 'email')
notification.html += '<p>'+p.commentExcerpt+'</p><a href="'+getPostCommentUrl(p.postId, p.commentId)+'" class="action-link">'+i18n.t('Read more')+'</a>';
break;

View file

@ -1,194 +1,190 @@
fr = {
'fr': {
translation: {
//Navigation
"Menu": "Menu",
"Top": "Top",
"New": "Nouveau",
"Digest": "Résumé",
"Categories": "Catégories",
"Users": "Utilisateurs",
"Settings": "Paramètres",
"Admin": "Admin",
"Post": "Poster",
"Toolbox": "Outils",
"Sign Up/Sign In": "Connexion/Créer un compte",
"My Account": "Mon compte",
"View Profile": "Voir le profil",
"Edit Account": "Editer le compte",
i18n.translations.fr = {
//Navigation
"Menu": "Menu",
"Top": "Top",
"New": "Nouveau",
"Digest": "Résumé",
"Categories": "Catégories",
"Users": "Utilisateurs",
"Settings": "Paramètres",
"Admin": "Admin",
"Post": "Poster",
"Toolbox": "Outils",
"Sign Up/Sign In": "Connexion/Créer un compte",
"My Account": "Mon compte",
"View Profile": "Voir le profil",
"Edit Account": "Editer le compte",
//Main
"New Posts": "Nouveaux Posts",
//Main
"New Posts": "Nouveaux Posts",
//Commments
"Your comment has been deleted.": "Votre commentaire a été supprimé.",
"Comment": "Commentaire",
"Delete Comment": "Supprimer le commentaire",
"Add Comment": "Ajouter un commentaire",
"upvote": "upvote",
"downvote": "downvote",
"link": "lien",
"Edit": "Editer",
"Reply": "Répondre",
"No comments.": "Aucun commentaire.",
//Commments
"Your comment has been deleted.": "Votre commentaire a été supprimé.",
"Comment": "Commentaire",
"Delete Comment": "Supprimer le commentaire",
"Add Comment": "Ajouter un commentaire",
"upvote": "upvote",
"downvote": "downvote",
"link": "lien",
"Edit": "Editer",
"Reply": "Répondre",
"No comments.": "Aucun commentaire.",
//Errors
"You are already logged in": "Vous êtes déjà connecté",
"Sorry, this is a private site. Please sign up first.": "Désolé mais ce site est privé, vous devez d'abord vous connecter",
"Thanks for signing up!": "Merci pour votre inscription !",
"The site is currently invite-only, but we will let you know as soon as a spot opens up.": "L'accès au site se fait uniquement par invitation. Nous vous informerons dès qu'une place se libère.",
"Sorry, you don't have the rights to view this page.": "Désolé, vous n'avez pas le droit de voir cette page.",
"Not Found!": "Oups",
"We're sorry; whatever you were looking for isn't here..": "Désolé, mais ce que vous cherchez ne se trouve pas ici...",
//Errors
"You are already logged in": "Vous êtes déjà connecté",
"Sorry, this is a private site. Please sign up first.": "Désolé mais ce site est privé, vous devez d'abord vous connecter",
"Thanks for signing up!": "Merci pour votre inscription !",
"The site is currently invite-only, but we will let you know as soon as a spot opens up.": "L'accès au site se fait uniquement par invitation. Nous vous informerons dès qu'une place se libère.",
"Sorry, you don't have the rights to view this page.": "Désolé, vous n'avez pas le droit de voir cette page.",
"Not Found!": "Oups",
"We're sorry; whatever you were looking for isn't here..": "Désolé, mais ce que vous cherchez ne se trouve pas ici...",
//Notifications
"No notifications": "Aucune notification",
"1 notification": "1 notification",
"notifications": "notifications",
"Mark all as read": "Effacer les notifications",
//Notifications
"No notifications": "Aucune notification",
"1 notification": "1 notification",
"notifications": "notifications",
"Mark all as read": "Effacer les notifications",
// Post deleted
"Your post has been deleted.": "Votre post a été supprimé.",
// Post deleted
"Your post has been deleted.": "Votre post a été supprimé.",
// Post digest
"The top 5 posts of each day.": "5 meilleurs post par jours",
"Previous Day": "Jour précédent",
"Next Day": "Jour suivant",
"Sorry, no posts for today": "Désolé, aucun post aujourd'hui",
"Today": "Aujourd'hui",
"Yesterday": "Hier",
// Post digest
"The top 5 posts of each day.": "5 meilleurs post par jours",
"Previous Day": "Jour précédent",
"Next Day": "Jour suivant",
"Sorry, no posts for today": "Désolé, aucun post aujourd'hui",
"Today": "Aujourd'hui",
"Yesterday": "Hier",
// Post submit & edit
"Created": "Crée",
"Title": "Titre",
"Suggest title": "Suggérer un titre",
"URL": "URL",
"Short URL": "URL Courte",
"Body": "Description",
"Category": "Catégorie",
"Inactive?": "Inactif ?",
"Sticky?": "Mis en avant ?",
"Submission Date": "Date de soumission",
"Submission Time": "Heure de soumission",
"Date": "Date",
"Submission": "Soumission",
"Note: this post is still pending so it has no submission timestamp yet.": "Note : ce post est en cours de validation, il n'a pas encore de timestamp.",
"User": "Utilisateur",
"Status": "Status",
"Approved": "Approuvé",
"Rejected": "Rejeté",
"Delete Post": "Supprimer le post",
"Thanks, your post is awaiting approval.": "Merci, votre post est en cours de validation",
"Sorry, couldn't find a title...": "Désolé, impossible de trouver un titre...",
"Please fill in an URL first!": "Vous devez saisir une URL.",
// Post submit & edit
"Created": "Crée",
"Title": "Titre",
"Suggest title": "Suggérer un titre",
"URL": "URL",
"Short URL": "URL Courte",
"Body": "Description",
"Category": "Catégorie",
"Inactive?": "Inactif ?",
"Sticky?": "Mis en avant ?",
"Submission Date": "Date de soumission",
"Submission Time": "Heure de soumission",
"Date": "Date",
"Submission": "Soumission",
"Note: this post is still pending so it has no submission timestamp yet.": "Note : ce post est en cours de validation, il n'a pas encore de timestamp.",
"User": "Utilisateur",
"Status": "Status",
"Approved": "Approuvé",
"Rejected": "Rejeté",
"Delete Post": "Supprimer le post",
"Thanks, your post is awaiting approval.": "Merci, votre post est en cours de validation",
"Sorry, couldn't find a title...": "Désolé, impossible de trouver un titre...",
"Please fill in an URL first!": "Vous devez saisir une URL.",
// Post item
"Share": "Partager",
"Discuss": "Discuter",
"Upvote": "Voter",
"Sticky": "Mis en avant",
"status": "status",
"votes": "votes",
"baseScore": "baseScore",
"score": "score",
"clicks": "clics",
"inactive": "inactif",
"comment": "commentaire",
"comments": "commentaires",
"point": "point",
"points": "points",
// Post item
"Share": "Partager",
"Discuss": "Discuter",
"Upvote": "Voter",
"Sticky": "Mis en avant",
"status": "status",
"votes": "votes",
"baseScore": "baseScore",
"score": "score",
"clicks": "clics",
"inactive": "inactif",
"comment": "commentaire",
"comments": "commentaires",
"point": "point",
"points": "points",
//User
"Please complete your profile below before continuing.": "Merci de compléter votre profil avant de continuer.",
"Account": "Compte",
"Username": "Nom d'utilisateur",
"Display Name": "Nom réel",
"Email": "Email",
"Bio": "Bio",
"Password": "Mot de passe",
"Change Password?": "Changer de mot de passe",
"Old Password": "Ancien mot de passe",
"New Password": "Nouveau mot de passe",
"Email Notifications": "Notifications par email",
"New Posts": "Nouveau Post",
"Comments on my posts": "Commentaires sur mes posts",
"Replies to my comments": "Reponses à mes commentaires",
"Forgot password?": "Mot de passe oublié ?",
"Profile updated": "Profil mis à jour",
"Please fill in your email below to finish signing up.": "Merci de saisir votre email pour finir la création de votre compte",
"Invite": "Inviter",
"Uninvite": "Annuler l'invitation",
"Make admin": "Rendre admin",
"Unadmin": "Supprimer les droits d'admin",
"Delete User": "Supprimer l'utilisateur",
"Are you sure you want to delete ": "Etes-vous sur de vouloir supprimer ",
"Reset Password": "Redéfinir le mot de passe",
"Password reset link sent!": "Un lien pour redéfinir votre mot de passe a été envoyé !",
"Name": "Nom",
"Posts": "Posts",
"Comments": "Commentaires",
"Karma": "Karma",
"Is Invited?": "Est-il invité ?",
"Is Admin?": "Est-il Administrateur ?",
"Delete": "Supprimer",
"Member since": "Membre depuis",
"Edit profile": "Modifier le profil",
"Sign In": "Connexion",
"Sign in!": "Connexion",
"Sign up!": "Créer un compte !",
"Don't have an account?": "Pas encore de compte ?",
"Already have an account?": "Déjà un compte ?",
"Sign Up": "Créer un compte",
"Please fill in all fields": "Vous devez remplir tous les champs",
"Invite ": "Invitation ",
"left": " restante",
"Invite (none left)": "Invitation (aucune restante)",
"All": "All",
"Invited": "Invité",
"Uninvited": "Pas invité",
"Filter by": "Filtrer par",
"Sort by": "Trier par",
//User
"Please complete your profile below before continuing.": "Merci de compléter votre profil avant de continuer.",
"Account": "Compte",
"Username": "Nom d'utilisateur",
"Display Name": "Nom réel",
"Email": "Email",
"Bio": "Bio",
"Password": "Mot de passe",
"Change Password?": "Changer de mot de passe",
"Old Password": "Ancien mot de passe",
"New Password": "Nouveau mot de passe",
"Email Notifications": "Notifications par email",
"New Posts": "Nouveau Post",
"Comments on my posts": "Commentaires sur mes posts",
"Replies to my comments": "Reponses à mes commentaires",
"Forgot password?": "Mot de passe oublié ?",
"Profile updated": "Profil mis à jour",
"Please fill in your email below to finish signing up.": "Merci de saisir votre email pour finir la création de votre compte",
"Invite": "Inviter",
"Uninvite": "Annuler l'invitation",
"Make admin": "Rendre admin",
"Unadmin": "Supprimer les droits d'admin",
"Delete User": "Supprimer l'utilisateur",
"Are you sure you want to delete ": "Etes-vous sur de vouloir supprimer ",
"Reset Password": "Redéfinir le mot de passe",
"Password reset link sent!": "Un lien pour redéfinir votre mot de passe a été envoyé !",
"Name": "Nom",
"Posts": "Posts",
"Comments": "Commentaires",
"Karma": "Karma",
"Is Invited?": "Est-il invité ?",
"Is Admin?": "Est-il Administrateur ?",
"Delete": "Supprimer",
"Member since": "Membre depuis",
"Edit profile": "Modifier le profil",
"Sign In": "Connexion",
"Sign in!": "Connexion",
"Sign up!": "Créer un compte !",
"Don't have an account?": "Pas encore de compte ?",
"Already have an account?": "Déjà un compte ?",
"Sign Up": "Créer un compte",
"Please fill in all fields": "Vous devez remplir tous les champs",
"Invite ": "Invitation ",
"left": " restante",
"Invite (none left)": "Invitation (aucune restante)",
"All": "All",
"Invited": "Invité",
"Uninvited": "Pas invité",
"Filter by": "Filtrer par",
"Sort by": "Trier par",
//Helpers
"Sorry, you do not have access to this page": "Désolé, vous n'avez pas accès à cette page",
"Please Sign In First.": "Vous devez d'abord vous connecter.",
"Sorry, you have to be an admin to view this page.": "Désolé, vous devez être administrateur pour voir cette page.",
"Sorry, you don't have permissions to add new items.": "Désolé, vous n'avez pas la permission d'ajouter de nouveaux posts.",
"Sorry, you cannot edit this post.": "Désolé, vous ne pouvez pas modifier ce post.",
"Sorry, you cannot edit this comment.": "Désolé, vous ne pouvez pas modifier ce commentaire.",
//Helpers
"Sorry, you do not have access to this page": "Désolé, vous n'avez pas accès à cette page",
"Please Sign In First.": "Vous devez d'abord vous connecter.",
"Sorry, you have to be an admin to view this page.": "Désolé, vous devez être administrateur pour voir cette page.",
"Sorry, you don't have permissions to add new items.": "Désolé, vous n'avez pas la permission d'ajouter de nouveaux posts.",
"Sorry, you cannot edit this post.": "Désolé, vous ne pouvez pas modifier ce post.",
"Sorry, you cannot edit this comment.": "Désolé, vous ne pouvez pas modifier ce commentaire.",
//Collections
"You need to login and be an admin to add a new category.": "Vous devez être administrateur et connecté pour ajouter une catégorie",
"You need to login or be invited to post new comments.": "Vous devez être connecté et invité pour poster des commentaires",
"Please wait ": "Merci de patienter ",
" seconds before commenting again": " secondes avant de poster un nouveau commentaire",
"Your comment is empty.": "Votre commentaire est vide",
"You don't have permission to delete this comment.": "Vous n'avez pas la permission de supprimer ce commentaire",
"You need to login or be invited to post new stories.": "Vous devez être connecté ou invité pour créer un nouveau post",
"Please fill in a headline": "Merci de saisir un titre",
"This link has already been posted": "Ce lien a déjà été posté",
"Sorry, you cannot submit more than ": "Désolé, vous ne pouvez pas créer plus de ",
" posts per day": " posts par jour",
"Someone replied to your comment on": "Quelqu'un à répondu à votre commentaire sur",
" has replied to your comment on": " a répondu à votre commentaire sur",
"Read more": "Lire la suite",
"A new comment on your post": "Un nouveau commentaire sur votre post",
"You have a new comment by ": "Vous avez un nouveau commentaire de ",
" on your post": " sur votre post",
" has created a new post": " a créer un nouveau post",
"Your account has been approved.": "Votre compte a été validé.",
"Welcome to ": "Bienvenu sur ",
"Start posting.": "Commencer à poster.",
//Collections
"You need to login and be an admin to add a new category.": "Vous devez être administrateur et connecté pour ajouter une catégorie",
"You need to login or be invited to post new comments.": "Vous devez être connecté et invité pour poster des commentaires",
"Please wait ": "Merci de patienter ",
" seconds before commenting again": " secondes avant de poster un nouveau commentaire",
"Your comment is empty.": "Votre commentaire est vide",
"You don't have permission to delete this comment.": "Vous n'avez pas la permission de supprimer ce commentaire",
"You need to login or be invited to post new stories.": "Vous devez être connecté ou invité pour créer un nouveau post",
"Please fill in a headline": "Merci de saisir un titre",
"This link has already been posted": "Ce lien a déjà été posté",
"Sorry, you cannot submit more than ": "Désolé, vous ne pouvez pas créer plus de ",
" posts per day": " posts par jour",
"Someone replied to your comment on": "Quelqu'un à répondu à votre commentaire sur",
" has replied to your comment on": " a répondu à votre commentaire sur",
"Read more": "Lire la suite",
"A new comment on your post": "Un nouveau commentaire sur votre post",
"You have a new comment by ": "Vous avez un nouveau commentaire de ",
" on your post": " sur votre post",
" has created a new post": " a créer un nouveau post",
"Your account has been approved.": "Votre compte a été validé.",
"Welcome to ": "Bienvenu sur ",
"Start posting.": "Commencer à poster.",
//Common
"Pending": "En attente",
"Loading...": "Chargement...",
"Submit": "Envoyer",
"You must be logged in.": "Vous devez être connecté",
"Are you sure?": "Etes-vous sur ?",
"Please log in first": "Vous devez être connecté",
"Sign In/Sign Up with Twitter": "Connexion/Créer un compte avec Twitter",
"Load more": "Charger plus"
}
}
//Common
"Pending": "En attente",
"Loading...": "Chargement...",
"Submit": "Envoyer",
"You must be logged in.": "Vous devez être connecté",
"Are you sure?": "Etes-vous sur ?",
"Please log in first": "Vous devez être connecté",
"Sign In/Sign Up with Twitter": "Connexion/Créer un compte avec Twitter",
"Load more": "Charger plus"
};

1
packages/telescope-i18n/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.build*

View file

@ -0,0 +1,19 @@
i18n = {
translations: [],
t: function (str) {
var lang = getSetting('language', 'en');
if(i18n.translations[lang] && i18n.translations[lang][str]){
return i18n.translations[lang][str];
}
return str;
}
};
if(Meteor.isClient){
Handlebars.registerHelper('i18n', function(str){
return i18n.t(str);
});
}

View file

@ -0,0 +1,7 @@
Package.describe("Telescope i18n package");
Package.on_use(function (api) {
api.use(['handlebars'], 'client');
api.add_files(['i18n.js'], ['client', 'server']);
api.export('i18n');
});

View file

@ -8,9 +8,6 @@
},
"crypto-md5": {},
"iron-router": {},
"i18next-meteor": {
"git": "git://github.com/SachaG/i18next-meteor.git"
},
"nprogress": {}
}
}

View file

@ -10,10 +10,6 @@
},
"crypto-md5": {},
"iron-router": {},
"i18next-meteor": {
"git": "git://github.com/SachaG/i18next-meteor.git",
"branch": "master"
},
"nprogress": {}
},
"packages": {
@ -23,9 +19,9 @@
"commit": "59a762e297082eea8b8cae00374c2b7ac6f89529"
},
"crypto-base": {
"git": "https://github.com/tmeasday/meteor-crypto-base.git",
"tag": "v0.0.3",
"commit": "fdc0b7b3d24e2e31c5c95beddafe890ffbaafd42"
"git": "https://github.com/oortcloud/meteor-crypto-base.git",
"tag": "v3.1.2.1",
"commit": "5df8d82a0595553415bbfae2930c6ecbeece5794"
},
"database-forms": {
"git": "git://github.com/SachaG/database-forms.git",
@ -33,20 +29,15 @@
"commit": "b11ac7d5ca10df610ee5ca810cde45bb38ac81b7"
},
"crypto-md5": {
"git": "https://github.com/tmeasday/meteor-crypto-md5.git",
"tag": "v0.0.2",
"commit": "a943bea4cffeac9a14c2825dfe57d32b9d677e6f"
"git": "https://github.com/oortcloud/meteor-crypto-md5.git",
"tag": "v3.1.2.2",
"commit": "75bbb3eeace302122d3554a6212a6fe92553fa18"
},
"iron-router": {
"git": "https://github.com/EventedMind/iron-router.git",
"tag": "v0.6.1",
"commit": "4e1ee0581d68bff422a915dacb0bd30eae10fe08"
},
"i18next-meteor": {
"git": "git://github.com/SachaG/i18next-meteor.git",
"branch": "master",
"commit": "429adc8e5f8049a3b0f4e6186d94482799253059"
},
"nprogress": {
"git": "https://github.com/zhouzhuojie/meteor-nprogress.git",
"tag": "v0.0.3",