summaryrefslogtreecommitdiff
path: root/includes/extras/functions.pl.php
diff options
context:
space:
mode:
authorŁukasz Wilenski <wooc@gazeta.pl>2010-04-23 15:27:30 +0000
committerŁukasz Wilenski <wooc@gazeta.pl>2010-04-23 15:27:30 +0000
commit058d73d5900d858dfa5ede1003fdd36500210282 (patch)
tree9331cc986c69bfe0c89d182e61db5f2de8fdc6f6 /includes/extras/functions.pl.php
parent92a0fc999fa7cbe7371a396e867648e686cf66b5 (diff)
downloadwebtrees-058d73d5900d858dfa5ede1003fdd36500210282.tar.gz
webtrees-058d73d5900d858dfa5ede1003fdd36500210282.tar.bz2
webtrees-058d73d5900d858dfa5ede1003fdd36500210282.zip
I18N
Diffstat (limited to 'includes/extras/functions.pl.php')
-rw-r--r--includes/extras/functions.pl.php198
1 files changed, 0 insertions, 198 deletions
diff --git a/includes/extras/functions.pl.php b/includes/extras/functions.pl.php
index e9d941de51..4b58136650 100644
--- a/includes/extras/functions.pl.php
+++ b/includes/extras/functions.pl.php
@@ -148,204 +148,6 @@ function age_localisation_pl(&$agestring, &$show_years) {
),
$agestring
);
-}
-/*
-function age2_localisation_pl($years) {
- if ($years==1) $years .= " ".i18n::translate('year');
- else if ($years > 1 && $years < 5) $years .= " ".i18n::translate('years');
- else if (substr($years, -1, 1) > 1 && substr($years, -1, 1) < 5 && substr($years, -2, 1) != 1) $years .= " ".i18n::translate('years');
- else $years .= " ".i18n::translate('years');
- return $years;
-}
-*/
-////////////////////////////////////////////////////////////////////////////////
-// Localise a date differences. Lokalizacja różnic dat.
-////////////////////////////////////////////////////////////////////////////////
-function date_diff_localisation_pl(&$label, &$gap) {
- $yrs = round($gap/12);
- if ($gap == 12 || $gap == -12) $label .= $yrs." rok"; // 1 rok
- else if (($yrs > 1 && $yrs < 5) || ($yrs < -1 && $yrs > -5)) $label .= $yrs." lata"; // 2-4 lata
- else if (($yrs > 21 || $yrs < -21) && substr($yrs, -1, 1) > 1 && substr($yrs, -1, 1) < 5 && substr($yrs, -2, 1) != 1) $label .= $yrs." lata";
- else if ($gap > 20 or $gap < -20) $label .= $yrs." lat"; // x lat
- else if ($gap == 1 || $gap == -1) $label .= $gap." miesiąc"; // 1 miesiąc
- else if (($gap > 1 && $gap < 5) || ($gap < -1 && $gap > -5)) $label .= $gap." miesiące"; // 2-4 miesiące
- else if ($gap != 0) $label .= $gap." miesięcy"; // x miesięcy
-}
-////////////////////////////////////////////////////////////////////////////////
-// Localise a number of people. Lokalizacja liczby osób.
-////////////////////////////////////////////////////////////////////////////////
-/*
-function num_people_localisation_pl(&$count) {
- if ($count == 1)
- print "<br /><b>".$count." ".i18n::translate('Individual')."</b>"; // 1 osoba
- else if ($count > 1 && $count < 5)
- print "<br /><b>".$count." ".i18n::translate('Individuals')."</b>"; // 2-4 osoby
- else if ($count > 21 && substr($count, -1, 1) > 1 && substr($count, -1, 1) < 5 && substr($count, -2, 1) != 1)
- print "<br /><b>".$count." ".i18n::translate('Individuals')."</b>"; // x2-x4 osoby
- else
- print "<br /><b>".$count." ".i18n::translate('Individuals')."</b>"; // x osób
-}
-*/
-///////////////////////////////////////////////////////////////////////////////////////////
-// Localise the _AKAN, _AKA, ALIA and _INTE facts. Lokalizacja faktów _AKAN, _AKA, ALIA i _INTE.
-///////////////////////////////////////////////////////////////////////////////////////////
-function fact_AKA_localisation_pl(&$fact, &$pid) {
-
- $person = Person::getInstance($pid);
- $sex = $person->getSex();
- if ($fact == "_INTE") {
- if ($sex == "M") $fact = "Pochowany"; // mężczyzna
- else if ($sex == "F") $fact = "Pochowana"; // kobieta
- }
- else {
- if ($sex == "M") $fact = "Znany także jako"; // mężczyzna
- else if ($sex == "F") $fact = "Znana także jako"; // kobieta
- }
-}
-///////////////////////////////////////////////////////////////////////////////////////////
-// Localise the _NMR facts. Lokalizacja faktów _NMR.
-///////////////////////////////////////////////////////////////////////////////////////////
-function fact_NMR_localisation_pl($fact, &$fid) {
-
- $family = Family::getInstance($fid);
- $husb = $family->getHusband();
- $wife = $family->getWife();
- if ($fact == "_NMR") {
- if (empty($wife) && !empty($husb)) $fact = "Nieżonaty"; // mężczyzna
- else if (empty($husb) && !empty($wife)) $fact = "Niezamężna"; // kobieta
- }
- else if ($fact == "_NMAR") {
- if (empty($wife) && !empty($husb)) $fact = "Nigdy nieżonaty"; // mężczyzna
- else if (empty($husb) && !empty($wife)) $fact = "Nigdy niezamężna"; // kobieta
- }
- return $fact;
-}
-///////////////////////////////////////////////////////////////////////////////////////////
-// Localise the AGNC fact. Lokalizacja faktu AGNC.
-///////////////////////////////////////////////////////////////////////////////////////////
-/*
-function fact_AGNC_localisation_pl($fact, $main_fact) {
-
- if ($main_fact == "EDUC") {
- $fact = "Szkoła/uczelnia";
- }
- else if ($main_fact == "OCCU") {
- $fact = "Miejsce pracy";
- }
- else if ($main_fact == "ORDN") {
- $fact = "Seminarium duchowne";
- }
-}
-*/
-////////////////////////////////////////////////////////////////////////////////
-// Localise the close relatives facts. Lokalizacja faktów dotyczących bliskich
-////////////////////////////////////////////////////////////////////////////////
-function cr_facts_localisation_pl(&$factrec, &$fact, &$explode_fact, &$pid) {
-
- $ct = preg_match_all("/\d ASSO @(.*)@/", $factrec, $match, PREG_SET_ORDER);
- if ($ct>0) $pid2 = $match[0][1];
- if (isset($pid2)) {
- $sex1 = Person::getInstance($pid)->getSex();
- $sex2 = Person::getInstance($pid2)->getSex();
-
- if ($explode_fact[1] == "BIRT") {
- switch ($explode_fact[2]) {
- case "SIBL":
- if ($sex2 == "M") $fact = "Narodziny brata";
- else if ($sex2 == "F") $fact = "Narodziny siostry";
- break;
- case "GCHI":
- if ($sex2 == "M") $fact = "Narodziny wnuka";
- else if ($sex2 == "F") $fact = "Narodziny wnuczki";
- break;
- case "GGCH":
- if ($sex2 == "M") $fact = "Narodziny prawnuka";
- else if ($sex2 == "F") $fact = "Narodziny prawnuczki";
- break;
- case "COUS":
- if ($sex2 == "M") $fact = "Narodziny kuzyna";
- else if ($sex2 == "F") $fact = "Narodziny kuzynki";
- break;
- case "FSIB":
- if ($sex2 == "M") $fact = "Narodziny brata ojca";
- else if ($sex2 == "F") $fact = "Narodziny siostry ojca";
- break;
- case "MSIB":
- if ($sex2 == "M") $fact = "Narodziny brata matki";
- else if ($sex2 == "F") $fact = "Narodziny siostry matki";
- break;
- case "NEPH":
- $node = get_relationship($pid, $pid2);
- if (isset($node["path"][1])) {
- $sex3 = Person::getInstance($node["path"][1])->getSex();
- if ($sex2 == "M") {
- if ($sex3 == "M") $fact = "Narodziny bratanka";
- else if ($sex3 == "F") $fact = "Narodziny siostrzeńca";
- }
- else if ($sex2 == "F") {
- if ($sex3 == "M") $fact = "Narodziny bratanicy";
- else if ($sex3 == "F") $fact = "Narodziny siostrzenicy";
- }
- }
- break;
- }
- }
- else if ($explode_fact[1] != "") {
- switch ($explode_fact[2]) {
- case "SIBL":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." brata";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." siostry";
- break;
- case "GCHI":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." wnuka";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." wnuczki";
- break;
- case "GGCH":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." prawnuka";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." prawnuczki";
- break;
- case "GPAR":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." dziadka";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." babci";
- break;
- case "GGPA":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." pradziadka";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." prababci";
- break;
- case "COUS":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." kuzyna";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." kuzynki";
- break;
- case "FSIB":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." brata ojca";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." siostry ojca";
- break;
- case "MSIB":
- if ($sex2 == "M") $fact = i18n::translate($explode_fact[1])." brata matki";
- else if ($sex2 == "F") $fact = i18n::translate($explode_fact[1])." siostry matki";
- break;
- case "SPOU":
- if ($sex2 == "M" || $sex1 == "F") $fact = i18n::translate($explode_fact[1])." męża";
- else if ($sex2 == "F" || $sex1 == "M") $fact = i18n::translate($explode_fact[1])." żony";
- break;
- case "NEPH":
- $node = get_relationship($pid, $pid2);
- if (isset($node["path"][1])) {
- $sex3 = Person::getInstance($node["path"][1])->getSex();
- if ($sex2 == "M") {
- if ($sex3 == "M") $fact = i18n::translate($explode_fact[1])." bratanka";
- else if ($sex3 == "F") $fact = i18n::translate($explode_fact[1])." siostrzeńca";
- }
- else if ($sex2 == "F") {
- if ($sex3 == "M") $fact = i18n::translate($explode_fact[1])." bratanicy";
- else if ($sex3 == "F") $fact = i18n::translate($explode_fact[1])." siostrzenicy";
- }
- }
- break;
- }
- }
- }
-}
////////////////////////////////////////////////////////////////////////////////
// Localise the relationships. Lokalizacja pokrewieństwa.
////////////////////////////////////////////////////////////////////////////////