Adjective added to web
This commit is contained in:
1 parent
a32b08cbf1
commit
418ceea507
5 files changed
+147
-13
No files matched your search
@@ -10,15 +10,35 @@ $this->pageTitle=Yii::t('app', Yii::app()->name);
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
<?=str_replace('{nounNominative}', $data["nominativeSingularForm"], Yii::t('dict', 'Most likely, original word is <b>{nounNominative}</b>'))?>
|
||||
<?php
|
||||
|
||||
$wordType = $data["word"];
|
||||
|
||||
$nounData = null;
|
||||
$adjectiveData = null;
|
||||
if ($wordType === "noun")
|
||||
{
|
||||
$nounData = $data["noun"];
|
||||
echo str_replace('{nominative}', $nounData["nominativeSingularForm"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
||||
echo Yii::t('dict', "This is noun") . "<BR>";
|
||||
}
|
||||
|
||||
if ($wordType === "adjective")
|
||||
{
|
||||
$adjectiveData = $data["adjective"];
|
||||
echo str_replace('{nominative}', $adjectiveData["nominativeSingularForm"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
||||
echo Yii::t('dict', "This is adjective") . "<BR>";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
|
||||
|
||||
if ($wordType === "noun")
|
||||
{
|
||||
$animateSuffix = "";
|
||||
if ($data["animated"] === "true")
|
||||
if ($nounData["animated"] === "true")
|
||||
{
|
||||
$animateSuffix = "ANIMATE";
|
||||
}
|
||||
@@ -28,13 +48,13 @@ else
|
||||
}
|
||||
|
||||
$genderSuffix = "";
|
||||
if ($data["count"] === "NC_SINGULAR")
|
||||
if ($nounData["count"] === "NC_SINGULAR")
|
||||
{
|
||||
if ($data["gender"] === "0")
|
||||
if ($nounData["gender"] === "0")
|
||||
{
|
||||
$genderSuffix = "_MALE";
|
||||
}
|
||||
else if ($data["gender"] === "1")
|
||||
else if ($nounData["gender"] === "1")
|
||||
{
|
||||
$genderSuffix = "_FEMALE";
|
||||
}
|
||||
@@ -46,29 +66,86 @@ if ($data["count"] === "NC_SINGULAR")
|
||||
|
||||
|
||||
|
||||
if ($data["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
||||
if ($nounData["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
||||
{
|
||||
$combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . "_" . $animateSuffix . $genderSuffix;
|
||||
$combinedStr = $nounData["grammaticalCase"] . "_" . $nounData["count"] . "_" . $animateSuffix . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
|
||||
}
|
||||
else if ($data["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
||||
else if ($nounData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
||||
{
|
||||
$combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . $genderSuffix;
|
||||
$combinedStr = $nounData["grammaticalCase"] . "_" . $nounData["count"] . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . $genderSuffix;
|
||||
$combinedStr = $nounData["grammaticalCase"] . "_" . $nounData["count"] . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
}
|
||||
|
||||
|
||||
echo Yii::t('dict', $animateSuffix) . "<BR>";
|
||||
|
||||
}
|
||||
|
||||
if ($wordType === "adjective")
|
||||
{
|
||||
$animateSuffix = "";
|
||||
if ($adjectiveData["animated"] === "true")
|
||||
{
|
||||
$animateSuffix = "ANIMATE";
|
||||
}
|
||||
else
|
||||
{
|
||||
$animateSuffix = "INANIMATE";
|
||||
}
|
||||
|
||||
|
||||
$genderSuffix = "";
|
||||
if ($adjectiveData["count"] === "NC_SINGULAR")
|
||||
{
|
||||
if ($adjectiveData["gender"] === "0")
|
||||
{
|
||||
$genderSuffix = "_MALE";
|
||||
}
|
||||
else if ($adjectiveData["gender"] === "1")
|
||||
{
|
||||
$genderSuffix = "_FEMALE";
|
||||
}
|
||||
else
|
||||
{
|
||||
$genderSuffix = "_NEUTER";
|
||||
}
|
||||
}
|
||||
|
||||
if ($adjectiveData["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
||||
{
|
||||
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . "_" . $animateSuffix . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
|
||||
}
|
||||
else if ($adjectiveData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
||||
{
|
||||
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
||||
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
||||
}
|
||||
|
||||
|
||||
echo Yii::t('dict', $animateSuffix) . "<BR>";
|
||||
|
||||
echo Yii::t('dict', $genderSuffix) . "<BR>";
|
||||
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user