Page MenuHomeCode

No OneTemporary

diff --git a/controllers/ship.php b/controllers/ship.php
index 7b53d63..5131cda 100644
--- a/controllers/ship.php
+++ b/controllers/ship.php
@@ -1,89 +1,90 @@
<?php
/**
* Ship
*
* Zed. The immensity of stars. The HyperShip. The people.
*
* (c) 2010, Dereckson, some rights reserved.
* Released under BSD license.
*
* This controller handle the /ship URL
*
* It allows the user to let personal notes about the ship.
*
* It uses the Ship model and the ship.tpl view
*
* @package Zed
* @subpackage Controllers
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @copyright 2010 Sébastien Santoro aka Dereckson
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @version 0.1
* @link http://scherzo.dereckson.be/doc/zed
* @link http://zed.dereckson.be/
* @filesource
*
* @todo prints information indicating if we're or not in the ship
* @todo implement a console to control the ship
*/
//
// Load library and language file
//
require_once('includes/objects/ship.php');
lang_load('ships.conf');
//
// Ship information
//
//Gets ship from URL
if (count($url) < 2) {
//No parameter, gets ship perso is onboard
if (!$code = $CurrentPerso->location->ship_code) {
- message_die(GENERAL_ERROR, "/ship/ must be followed by valid ship code.<br />/ship alone only works when you're aboard a ship", "URL error");
+ message_die(GENERAL_ERROR, lang_get("NotAboardNoCode"), lang_get("URLError"));
+ //"
}
$code = 'S' . $code;
} else {
//Code have been specified
$code = $url[1];
if (!preg_match("/^S[0-9]{5}$/", $code)) {
- message_die(GENERAL_ERROR, "/ship/ must be followed by valid ship code", "URL error");
+ message_die(GENERAL_ERROR, lang_get("InvalidShipCode"), lang_get("URLError"));
}
}
//Gets ship information
$ship = Ship::get($code);
//Gets perso note about this ship
$note = $CurrentPerso->get_note($code);
//Determines the spatial relation between perso and ship
//dieprint_r($CurrentPerso->location->ship_code);
//
// Actions handling
//
if ($_REQUEST['action'] == 'ship.setnote' && $_REQUEST['note'] != $note) {
//Updates note content
$CurrentPerso->set_note($code, $_REQUEST['note']);
$note = $_REQUEST['note'];
}
//
// HTML output
//
//Serves header
$smarty->assign('PAGE_TITLE', $ship->name);
include('header.php');
//Serves content
$smarty->assign('note', $note);
$smarty->assign('ship', $ship);
$smarty->display('ship.tpl');
//Serves footer
include('footer.php');
diff --git a/lang/en/core.conf b/lang/en/core.conf
index 90b47e5..6524106 100644
--- a/lang/en/core.conf
+++ b/lang/en/core.conf
@@ -1,195 +1,195 @@
#Zed language config file
#Language: English
#Code: en
#Author: Dereckson
###
### Site configuration
###
SiteTitle = Zed
Product = "<strong>Zed 0.1</strong>, alpha technical preview"
###
### General stuff
###
_t = ":"
Save = Save
###
### Login
###
Login = Login
Password = Password
OK = OK
LoginNotFound = Login not found.
IncorrectPassword = Incorrect password.
JaMata = Ja mata!
WelcomeBack = Welcome back.
OpenID = OpenID
Logout = Logout
###
### Errors
###
UnauthorizedAccess = "Unauthorized access"
SQLError = "SQL Error"
line = line
Error = Error
BackToHome = "Back to homepage"
-
+URLError = URL error
GeneralError = General error
PageNotFound = "Page not found"
#Keep those two lines in English, to help to identify error screens in any lang
FatalErrorScreen = Fatal error screen
FatalErrorInterrupt = Fatal error breaking screen
###
### Homepage
###
Welcome = Welcome
WelcomeText = "<p>Welcome to the Zed alpha technical preview. Zed, it's a mix between a gallery, a place to meet new and existing friends, with some RPG inspiration.<br />
The concept is to have each information stored at physical places in a virtual world, like the 80s cyberspace vision. Another goal is to build a community sharing values like cooperation, freedom, ethic.</p>"
###
### Homepage - messages
###
#NOTIFY if new messages
NewMessages = "You've got %d new message%s"
#messages.tpl, Reply
Reply = Reply
#messages.tpl, the X link title
DeleteThisMessage = Delete this message
#messages.tpl, the expression identifying a message sent by the site itself
SystemNotice = System Notice
#home.php, messages error
MessageDeleted = Message deleted.
NotYourMessage = This message is not one of yours.
MessageAlreadyDeleted = Message already deleted.
###
### Account create
###
CreateAccountTitle = Create an account
CreateAccountIntro = "<p>Welcome to Zed.<br />To get an account, you need an invite code. To get an invite code, ask who tell you about Zed.</p>"
YourLogin = The login you want
InviteCode = Your invite code
YourEmail = Your e-mail
EnterInviteCodePromptMessage = "Your invite code is something like ABC123."
EnterUsernamePromptMessage = "Enter your username, in lowercase (11 characters max.).<br />It's your usual username, not your character name."
EnterEmailPromptMessage = "Enter your e-mail. It will used (1) as password recovery method (2) to send you notification of new messages or events you've configured.<br />We don't like spam, so we take all the measures to protect your mail."
IncorrectInviteCode = "Your invite code's format isn't valid. It's something like ABC123."
InviteCodeAlreadyClaimed = "This invite code were valid. But it have already been claimed."
CreateAccountImageTitle = "Zed is for human being. But it's also for people defining themselves like other beings than humans."
CreateAccountImageAlt = "A strange-looking white picture. An half circle from top right to bottom right, then the brush come back in spirale to create a big white spot. Some brushes effects add fringes at start and end. Grayscale spots have been added in main circle."
MissingUsername = "You need to provide a login."
LoginUnavailable = "This login is already taken."
MissingPassword = "You need to provide a password."
InviteHaveBeenClaimed = "Your invite %s have just been claimed."
AccountCreated = "Your account is created. Welcome to Zed."
###
### Perso create/select
###
NewCharacterCreated = New character created
CreateCharacter = Create a character
EditCharacter = Edit %s information
FullName = Full name
Nickname = Nickname
Sex = Sex
Male = Male
Female = Female
Neutral = Neutral
Hermaphrodit = Hermaphrodit
Race = Race
NoSexSpecified = "Pick a sex, or '<em>Neutral</em>' if you don't want to tell it."
NoNicknameSpecified = "You must pick a nickname, it's like your login to identify your character."
NoFullnameSpecified = "All beings must have a name."
NoRaceSpecified = "You've to specify a race: '<em>humanoid</em>' for human and co.<br />If you don't want to specify a race, use the generic '<em>being</em>'."
UnavailableNickname = "This nickname is already used.<br />Choose a more original one."
PickPerso = Pick your perso
SwapPerso = "Swap perso (%s's logout)"
NewLocationNotify = "You're slowly awaking in a place you don't recognize."
InvitePersoCreated = "Good news! %s you invited is in our galaxy.
%s"
###
### Places
###
CurrentLocation = "Current location"
UnknownBody = "Unknown asteroid"
UnknownPlace = "Unknown place"
WherePlace = "%s @ %s"
SpaceAround = "Space around %s"
hypership = hypership
asteroid = asteroid
moon = moon
planet = planet
star = star
orbital = orbital
place = place
ship = ship
###
### Stories
###
InvalidStoryGUID = "In story mode, you can't use previous/back URL."
ExpiredStorySession = "Story choices URL are temporary.<br />You can't bookmark them or use in another session."
###
### Requests
###
Communicator = Communicator
SendRequestToHyperShip = Send a request to the hypership
Request = Request
Title = Title
Message = Message
Warning = "Warning:"
RequestHandledByHumans = Your request will be sent to and handled by humans.
Send = Send
RequestSent = Your request have been sent.
###
### MOTD
###
PushMessage = Push a message to the header
TextToAdd = Text to add
TextToAddWarning = Warning: once published, it can't be (easily) removed.
Rendering = How it will be printed?
RenderingWhere = "At the top right header corner:"
DummyPlaceholder = Here your message.
Push = Push
Published = Published :)
\ No newline at end of file
diff --git a/lang/en/ships.conf b/lang/en/ships.conf
index 32b7da5..4a2501b 100644
--- a/lang/en/ships.conf
+++ b/lang/en/ships.conf
@@ -1,11 +1,14 @@
#Zed language config file - Footer
#Language: English
#Code: en
#Author: Dereckson
###
### Ships
###
PersonalNotes = Your notes about this ship
-SaveNote = Save notes
\ No newline at end of file
+SaveNote = Save notes
+
+NotAboardNoCode = /ship/ must be followed by valid ship code.<br />/ship alone only works when you're aboard a ship
+InvalidShipCode = /ship/ must be followed by valid ship code
diff --git a/lang/fr/core.conf b/lang/fr/core.conf
index dae1e91..16eba38 100644
--- a/lang/fr/core.conf
+++ b/lang/fr/core.conf
@@ -1,195 +1,196 @@
#Zed language config file
#Language: English
#Code: fr
#Author: Dereckson
###
### Site configuration
###
SiteTitle = Zed
Product = "<strong>Zed 0.1</strong>, alpha technical preview"
###
### General stuff
###
_t = " :"
Save = Enregistrer
###
### Login
###
Login = Login
Password = Password
OK = OK
LoginNotFound = Login introuvable.
IncorrectPassword = Mot de passe incorrect.
JaMata = Ja mata!
WelcomeBack = Welcome back.
OpenID = OpenID
Logout = Déconnexion
###
### Erreurs
###
UnauthorizedAccess = "Accès non autorisé"
SQLError = "Erreur SQL"
line = ligne
Error = Erreur
+URLError = "Erreur d'URL"
BackToHome = "Retourner à la page d'accueil"
GeneralError = "Erreur générale"
PageNotFound = "Cette page n'existe pas."
#Veuillez laisser en anglais, pour identifier plus clairement les erreurs.
FatalErrorScreen = Fatal error screen
FatalErrorInterrupt = Fatal error breaking screen
###
### Homepage
###
Welcome = Bienvenue
WelcomeText = "<p>Bienvenue sur la version alpha de Zed, un hybride un peu étrange entre une galerie, un endroit où rencontrer ses amis ou s'en faire de nouveaux, avec une légère inspiration RPG, dans un environnement galactique inspiré des romans de la Culture de Iain M. Banks.</p>
<p>Le concept est d'expérimenter ce qui se passe lorsque chaque information est dans un espace précis, un peu comme la vision cyberpunk des années 80 du cyberespace. Un autre but est de créer une communauté partagant des valeurs de respect, de coopération, de liberté et d'éthique.</p>"
###
### Homepage - Messages
###
#NOTIFY if new messages
NewMessages = "Vous avez reçu %d message%s"
#messages.tpl, Reply
Reply = Répondre
#messages.tpl, the X link title
DeleteThisMessage = Effacer ce message
#messages.tpl, the expression identifying a message sent by the site itself
SystemNotice = Note système
#home.php, messages error
MessageDeleted = Message effacé.
NotYourMessage = Hey, ce message appartient à autrui !
MessageAlreadyDeleted = Message déjà effacé
###
### Account create
###
CreateAccountTitle = Créer un compte
CreateAccountIntro = "<p>Bienvenue sur Zed.<br />Zed est un site privé uniquement accessible suite à l'invitation d'un membre.</p>"
YourLogin = Le login de votre choix
InviteCode = "Votre code d'invitation"
YourEmail = Votre adresse e-mail
EnterInviteCodePromptMessage = "Votre code d'invitation ressemble à ABC123."
EnterUsernamePromptMessage = "Votre login sera en minuscule et d'au plus onze caractères.<br />Il sera uniquement utilisé pour vous identifier, votre login NE sera PAS le nom de votre perso."
EnterEmailPromptMessage = "Votre adresse sera utilisée pour vous permettre de modifier votre mot de passe en cas d'oubli. Vous pourrez également configurer des notifications en cas de nouveau message & co, mais par défaut c'est désactivé."
IncorrectInviteCode = "Format invalide du code d'invitation,<br />recherchez quelque chose ressemblant à ABC123."
InviteCodeAlreadyClaimed = "Ce code d'invitation était certes valide mais a déjà été utilisé par autrui."
CreateAccountImageTitle = "Zed est un site pour les êtres humains. Mais aussi pour tous ceux qui se définissent autrement que comme humain."
CreateAccountImageAlt = "Une étrange créature blanche. Un demi cercle allant d'en haut à droite vers le bas à droite ; la brosse poursuit ensuite en spirale pour créer une grosse tâche blanche. Les effets de la brosse ajoutent au début et à la fin des franges. Des tâches grises ont été rajoutées au centre."
MissingUsername = "Vous avez oublié de spécifier le login."
LoginUnavailable = "Ce login est déjà utilisé."
MissingPassword = "Vous avez oublié de spécifier le mot de passe."
InviteHaveBeenClaimed = "Votre invitation %s a été acceptée."
AccountCreated = "Votre compte a été créé. Bienvenue sur Zed."
###
### Perso create/select
###
NewCharacterCreated = Nouveau perso créé.
CreateCharacter = Nouveau perso
EditCharacter = Éditer les infos de %s
FullName = Prénom et nom
Nickname = Pseudonyme
Sex = Sexe
Male = Masculin
Female = Féminin
Neutral = Neutre
Hermaphrodit = Hermaphrodite
Race = Race
NoSexSpecified = "Quel est votre sexe ? Si vous ne souhaitez pas le dévoiler, vous pouvez toujours utiliser '<em>Neutral</em>'."
NoNicknameSpecified = "Vous devez choisir un pseudo. C'est comme un login, pour votre perso."
NoFullnameSpecified = "Tous les êtres doivent avoir un nom."
NoRaceSpecified = "Spécifiez une race: '<em>humanoid</em>' pour les humains et humanoïdes.<br />Si vous ne souhaitez pas spécifier de race, vous pouvez utiliser '<em>being</em>'."
UnavailableNickname = "Ce pseudo est déjà utilisé.<br />Veuillez en choisir un plus original."
PickPerso = "Sélectionnez votre perso"
SwapPerso = "Changer de perso (déco %s)"
NewLocationNotify = "Vous vous réveillez lentement dans un endroit inconnu"
InvitePersoCreated = "Bonne nouvelle ! %s vient d'arriver dans notre galaxie.
%s"
###
### Places
###
CurrentLocation = "Localisateur"
UnknownBody = "Astéroïde inconnu"
UnknownPlace = "Endroit inconnu"
WherePlace = "%2$s, %1$s."
SpaceAround = "%s et l'espace aux alentours"
hypership = hypership
asteroid = astéroïde
moon = lune
planet = planète
star = étoile
orbital = orbitale
place = endroit
ship = vaisseau
###
### Stories
###
InvalidStoryGUID = "En mode récit, il n'est pas possible <br />d'utiliser les boutons précédents et suivants."
ExpiredStorySession = "Les URL de choix sont temporaires.<br />Il n'est pas possible de les bookmark pour y revenir."
###
### Requests
###
Communicator = Communicator
SendRequestToHyperShip = "Envoyer une requête à l'HyperShip"
Request = Requête
Title = Titre
Message = Message
Warning = "Attention :"
RequestHandledByHumans = "Votre requête sera envoyée à et traitées par des humains."
Send = Envoyer
RequestSent = Votre requête a bien été envoyée.
###
### MOTD
###
PushMessage = Publier un message tout en haut
TextToAdd = Texte à ajouter
TextToAddWarning = "Une fois publié, ne peut être facilement enlevé."
Rendering = Aperçu
RenderingWhere = "Coin supérieur droit de la page :"
DummyPlaceholder = Lorem ipsum dolor.
Push = Publier
Published = Publié :)
\ No newline at end of file
diff --git a/lang/fr/ships.conf b/lang/fr/ships.conf
index 96e8167..e8a02e6 100644
--- a/lang/fr/ships.conf
+++ b/lang/fr/ships.conf
@@ -1,11 +1,14 @@
#Zed language config file - Footer
#Language: French
#Code: fr
#Author: Dereckson
###
### Ships
###
PersonalNotes = Vos notes à propos de ce vaisseau
-SaveNote = Mettre à jour ces notes
\ No newline at end of file
+SaveNote = Mettre à jour ces notes
+
+NotAboardNoCode = "/ship/ doit être suivi du code du vaisseau.<br />/ship seul ne fonctionne qu'une fois à bord."
+InvalidShipCode = "Le code de vaisseau, présent dans l'URL à droite de /ship/, est invalide."

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 10, 16:35 (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
20730
Default Alt Text
(15 KB)

Event Timeline