diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php
index 40ef7aeff..d2ef6e2c5 100644
--- a/Web/Models/Entities/User.php
+++ b/Web/Models/Entities/User.php
@@ -783,7 +783,29 @@ function getNsfwTolerance(): int
function isFemale(): bool
{
- return (bool) $this->getRecord()->sex;
+ return (bool) $this->getRecord()->sex == 1;
+ }
+
+ function isNeutral(): bool
+ {
+ return (bool) $this->getRecord()->sex == 2;
+ }
+
+ function getLocalizedPronouns(): string
+ {
+ switch ($this->getRecord()->sex) {
+ case 0:
+ return tr('male');
+ case 1:
+ return tr('female');
+ case 2:
+ return tr('neutral');
+ }
+ }
+
+ function getPronouns(): int
+ {
+ return $this->getRecord()->sex;
}
function isVerified(): bool
diff --git a/Web/Presenters/AuthPresenter.php b/Web/Presenters/AuthPresenter.php
index c6a7f143f..7edcda7c2 100644
--- a/Web/Presenters/AuthPresenter.php
+++ b/Web/Presenters/AuthPresenter.php
@@ -95,7 +95,17 @@ function renderRegister(): void
$user = new User;
$user->setFirst_Name($this->postParam("first_name"));
$user->setLast_Name($this->postParam("last_name"));
- $user->setSex((int)($this->postParam("sex") === "female"));
+ switch ($this->postParam("pronouns")) {
+ case 'male':
+ $user->setSex(0);
+ break;
+ case 'female':
+ $user->setSex(1);
+ break;
+ case 'neutral':
+ $user->setSex(2);
+ break;
+ }
$user->setEmail($this->postParam("email"));
$user->setSince(date("Y-m-d H:i:s"));
$user->setRegistering_Ip(CONNECTING_IP);
diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php
index 56d5685b8..d0534a0e9 100644
--- a/Web/Presenters/UserPresenter.php
+++ b/Web/Presenters/UserPresenter.php
@@ -170,8 +170,18 @@ function renderEdit(): void
if ($this->postParam("politViews") <= 9 && $this->postParam("politViews") >= 0)
$user->setPolit_Views($this->postParam("politViews"));
- if ($this->postParam("gender") <= 1 && $this->postParam("gender") >= 0)
- $user->setSex($this->postParam("gender"));
+ if ($this->postParam("pronouns") <= 2 && $this->postParam("pronouns") >= 0)
+ switch ($this->postParam("pronouns")) {
+ case 'male':
+ $user->setSex(0);
+ break;
+ case 'female':
+ $user->setSex(1);
+ break;
+ case 'neutral':
+ $user->setSex(2);
+ break;
+ }
$user->setAudio_broadcast_enabled($this->checkbox("broadcast_music"));
if(!empty($this->postParam("phone")) && $this->postParam("phone") !== $user->getPhone()) {
diff --git a/Web/Presenters/templates/Auth/Register.xml b/Web/Presenters/templates/Auth/Register.xml
index 238576339..120c0b912 100644
--- a/Web/Presenters/templates/Auth/Register.xml
+++ b/Web/Presenters/templates/Auth/Register.xml
@@ -91,13 +91,13 @@
- {_gender}:
+ {_pronouns}:
|
- {var $femalePreferred = OPENVK_ROOT_CONF["openvk"]["preferences"]["femaleGenderPriority"]}
- |
diff --git a/Web/Presenters/templates/User/Edit.xml b/Web/Presenters/templates/User/Edit.xml
index 0a28b879c..b6cadf37b 100644
--- a/Web/Presenters/templates/User/Edit.xml
+++ b/Web/Presenters/templates/User/Edit.xml
@@ -139,12 +139,13 @@
- {_gender}:
+ {_pronouns}:
|
-
-
-
+
+
+
+
|
diff --git a/locales/README.md b/locales/README.md
old mode 100644
new mode 100755
diff --git a/locales/by.strings b/locales/by.strings
old mode 100644
new mode 100755
diff --git a/locales/by_lat.strings b/locales/by_lat.strings
old mode 100644
new mode 100755
diff --git a/locales/de.strings b/locales/de.strings
old mode 100644
new mode 100755
diff --git a/locales/en.strings b/locales/en.strings
index 53385ff9b..e24b048d1 100644
--- a/locales/en.strings
+++ b/locales/en.strings
@@ -72,9 +72,10 @@
"change_status" = "change status";
"name" = "Name";
"surname" = "Surname";
-"gender" = "Sex";
-"male" = "male";
-"female" = "female";
+"pronouns" = "Pronouns";
+"male" = "he/him";
+"female" = "she/her";
+"neutral" = "they/them";
"description" = "Description";
"save" = "Save";
"main_information" = "Main information";
diff --git a/locales/eo.strings b/locales/eo.strings
old mode 100644
new mode 100755
diff --git a/locales/hy.strings b/locales/hy.strings
old mode 100644
new mode 100755
diff --git a/locales/id.strings b/locales/id.strings
old mode 100644
new mode 100755
diff --git a/locales/kk.strings b/locales/kk.strings
old mode 100644
new mode 100755
diff --git a/locales/pl.strings b/locales/pl.strings
old mode 100644
new mode 100755
diff --git a/locales/qqx.strings b/locales/qqx.strings
old mode 100644
new mode 100755
diff --git a/locales/ru.strings b/locales/ru.strings
index 63f404624..0157a1371 100644
--- a/locales/ru.strings
+++ b/locales/ru.strings
@@ -62,9 +62,10 @@
"change_status" = "изменить статус";
"name" = "Имя";
"surname" = "Фамилия";
-"gender" = "Пол";
-"male" = "мужской";
-"female" = "женский";
+"pronouns" = "Местоимения";
+"male" = "он/его";
+"female" = "она/её";
+"neutral" = "они/их";
"description" = "Описание";
"save" = "Сохранить";
"main_information" = "Основная информация";
diff --git a/locales/ru_old.strings b/locales/ru_old.strings
old mode 100644
new mode 100755
diff --git a/locales/ru_sov.strings b/locales/ru_sov.strings
old mode 100644
new mode 100755
diff --git a/locales/sr_cyr.strings b/locales/sr_cyr.strings
old mode 100644
new mode 100755
diff --git a/locales/sr_lat.strings b/locales/sr_lat.strings
old mode 100644
new mode 100755
diff --git a/locales/tr.strings b/locales/tr.strings
old mode 100644
new mode 100755
diff --git a/locales/udm.strings b/locales/udm.strings
old mode 100644
new mode 100755
diff --git a/locales/uk.strings b/locales/uk.strings
index 41e7331db..bfac83220 100644
--- a/locales/uk.strings
+++ b/locales/uk.strings
@@ -64,9 +64,10 @@
"change_status" = "змінити статус";
"name" = "Ім’я";
"surname" = "Прізвище";
-"gender" = "Стать";
-"male" = "Чоловіча";
-"female" = "Жіноча";
+"pronouns" = "Займенники";
+"male" = "він/його";
+"female" = "вона/її";
+"neutral" = "вони/їх";
"description" = "Опис";
"save" = "Зберегти";
"main_information" = "Основна інформація";