Skip to content

Commit 34edbe4

Browse files
author
Hugues Max
committed
inital project version
Hugues
0 parents  commit 34edbe4

File tree

360 files changed

+47882
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+47882
-0
lines changed

I18N/Lang/Readme.txt

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Gestion MultiLangue
2+
===================
3+
Utiliser le module Dancer::Plugin::I18N
4+
my $lang = languages ;
5+
contient la liste des langues du navigateur
6+
exemple de mon navigateur
7+
8+
$VAR1 = [ 'fr-fr', 'fr', 'en', 'nl-nl', 'nl', 'en-gb', 'ru-ru', 'ru', 'it-it', 'it', 'fr-be', 'fr-ca', 'fr-lu', 'fr-ch', 'fr-mc', 'de-de', 'de', 'en-au', 'i-default' ];
9+
10+
11+
0) éditer le fichier config.yml et ajouter
12+
13+
# Module support MultiLangue
14+
############################
15+
16+
I18N:
17+
directory: I18N
18+
lang_default: fr
19+
20+
21+
1) choisir la langue de tag ( de base ) ( choisir d'anglais pour msgid , c'est msgid qu'il faut mettre dans le template )
22+
23+
<h3> Traduction de Hello en Français [% l('Hello') %] </h3>
24+
25+
26+
27+
Crée un fichier po de ce type
28+
29+
30+
# SOME DESCRIPTIVE TITLE.
31+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
32+
# This file is distributed under the same license as the PACKAGE package.
33+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
34+
#
35+
msgid ""
36+
msgstr ""
37+
"Project-Id-Version: Dancer\n"
38+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
39+
"PO-Revision-Date: 2014-03-13 14:31+0100\n"
40+
"Last-Translator: Hugues admin@softalys.com\n"
41+
"Language-Team: LANGUAGE <LL@li.org>\n"
42+
"MIME-Version: 1.0\n"
43+
"Content-Type: text/plain; charset=UTF-8\n"
44+
"Content-Transfer-Encoding: 8bit\n"
45+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
46+
"Language: fr_FR\n"
47+
48+
msgid "Hello"
49+
msgstr "Bonjour2"
50+
51+
52+
53+
une fois le fichier crée ( on peut l'éditer avec Poedit )
54+
55+
il faut le compiler avec la commande
56+
msgfmt --output-file=I18N/fr.mo I18N/fr.po
57+
58+
c'est le fichier fr.mo qui va être utiliser pour rechercher la traduction
59+
60+
61+
62+

I18N/Lang/en.po

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Dancer\n"
9+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"PO-Revision-Date: 2014-03-13 14:31+0100\n"
11+
"Last-Translator: Hugues admin@softalys.com\n"
12+
"Language-Team: LANGUAGE <LL@li.org>\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
"Language: fr_FR\n"
18+
19+
msgid "Hello"
20+
msgstr "Bonjour en Anglais"

I18N/Lang/fr.mo

444 Bytes
Binary file not shown.

I18N/Lang/fr.po

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Dancer\n"
9+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"PO-Revision-Date: 2014-03-13 14:31+0100\n"
11+
"Last-Translator: Hugues admin@softalys.com\n"
12+
"Language-Team: LANGUAGE <LL@li.org>\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
"Language: fr_FR\n"
18+
19+
msgid "Hello"
20+
msgstr "Bonjour en Français"

I18N/Lang/i_default.mo

444 Bytes
Binary file not shown.

I18N/Lang/i_default.po

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Dancer\n"
9+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"PO-Revision-Date: 2014-03-13 14:31+0100\n"
11+
"Last-Translator: Hugues admin@softalys.com\n"
12+
"Language-Team: LANGUAGE <LL@li.org>\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
"Language: fr_FR\n"
18+
19+
msgid "Hello"
20+
msgstr "Bonjour en i-default"

I18N/Lang/messages.pot

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Dancer\n"
9+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"PO-Revision-Date: 2014-03-13 14:31+0100\n"
11+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12+
"Language-Team: LANGUAGE <LL@li.org>\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
"Language: fr_FR\n"
18+
"X-Generator: Poedit 1.6.4\n"
19+
20+
#. ($r->maketext("ham")
21+
#: I18N/test.pl:1
22+
msgid "This is a %1 sandwich"
23+
msgstr "C'est un %1 sandwich"
24+
25+
msgid "Hello"
26+
msgstr "Bonjour"
27+

I18N/Lang/sv.po

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# French translations for I package.
2+
# Copyright (C) 2014 THE I'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the I package.
4+
# root <root@s30-localvm>, 2014.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: I 18N\n"
9+
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10+
"PO-Revision-Date: 2014-03-13 14:27+0100\n"
11+
"Last-Translator: root <root@s30-localvm>\n"
12+
"Language-Team: French\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=ASCII\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
17+
18+
#. ($r->maketext("ham")
19+
#: I18N/test.pl:1
20+
msgid "This is a %1 sandwich"
21+
msgstr ""

I18N/Lang/test.pl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$r->maketext("This is a [_1] sandwich", $r->maketext("ham"));

I18N/en.mo

442 Bytes
Binary file not shown.

I18N/fr.mo

444 Bytes
Binary file not shown.

I18N/i_default.mo

444 Bytes
Binary file not shown.

MANIFEST

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MANIFEST
2+
bin/app.pl
3+
config.yml
4+
environments/development.yml
5+
environments/production.yml
6+
views/index.tt
7+
views/layouts/main.tt
8+
MANIFEST.SKIP
9+
lib/m30.pm
10+
public/css/style.css
11+
public/css/error.css
12+
public/images/perldancer-bg.jpg
13+
public/images/perldancer.jpg
14+
public/500.html
15+
public/404.html
16+
public/dispatch.fcgi
17+
public/favicon.ico
18+
public/dispatch.cgi
19+
public/javascripts/jquery.js
20+
t/002_index_route.t
21+
t/001_base.t
22+
Makefile.PL

MANIFEST.SKIP

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
^\.git\/
2+
maint
3+
^tags$
4+
.last_cover_stats
5+
Makefile$
6+
^blib
7+
^pm_to_blib
8+
^.*.bak
9+
^.*.old
10+
^t.*sessions
11+
^cover_db
12+
^.*\.log
13+
^.*\.swp$

MANIFEST.bak

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MANIFEST
2+
bin/app.pl
3+
config.yml
4+
environments/development.yml
5+
environments/production.yml
6+
views/index.tt
7+
views/layouts/main.tt
8+
MANIFEST.SKIP
9+
lib/dancer_bootstrap_fontawesome_template.pm
10+
public/css/style.css
11+
public/css/error.css
12+
public/images/perldancer-bg.jpg
13+
public/images/perldancer.jpg
14+
public/500.html
15+
public/404.html
16+
public/dispatch.fcgi
17+
public/favicon.ico
18+
public/dispatch.cgi
19+
public/javascripts/jquery.js
20+
t/002_index_route.t
21+
t/001_base.t
22+
Makefile.PL

MYMETA.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"abstract" : "Money 30 TOOLS",
3+
"author" : [
4+
"Hugues BOUHANA <hugues.bouhana@softalys.com>"
5+
],
6+
"dynamic_config" : 0,
7+
"generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.133380",
8+
"license" : [
9+
"perl_5"
10+
],
11+
"meta-spec" : {
12+
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
13+
"version" : "2"
14+
},
15+
"name" : "m30",
16+
"no_index" : {
17+
"directory" : [
18+
"t",
19+
"inc"
20+
]
21+
},
22+
"prereqs" : {
23+
"build" : {
24+
"requires" : {
25+
"ExtUtils::MakeMaker" : "0"
26+
}
27+
},
28+
"configure" : {
29+
"requires" : {
30+
"ExtUtils::MakeMaker" : "0"
31+
}
32+
},
33+
"runtime" : {
34+
"requires" : {
35+
"Dancer" : "1.3095",
36+
"Template" : "0",
37+
"Test::More" : "0",
38+
"YAML" : "0"
39+
}
40+
}
41+
},
42+
"release_status" : "stable",
43+
"version" : "0.11"
44+
}

MYMETA.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
abstract: 'Money 30 TOOLS'
3+
author:
4+
- 'Hugues BOUHANA <hugues.bouhana@softalys.com>'
5+
build_requires:
6+
ExtUtils::MakeMaker: 0
7+
configure_requires:
8+
ExtUtils::MakeMaker: 0
9+
dynamic_config: 0
10+
generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.133380'
11+
license: perl
12+
meta-spec:
13+
url: http://module-build.sourceforge.net/META-spec-v1.4.html
14+
version: 1.4
15+
name: m30
16+
no_index:
17+
directory:
18+
- t
19+
- inc
20+
requires:
21+
Dancer: 1.3095
22+
Template: 0
23+
Test::More: 0
24+
YAML: 0
25+
version: 0.11

0 commit comments

Comments
 (0)