diff --git a/app/config/currencies.php b/app/config/currencies.php index b508d3f035..461230f19a 100644 --- a/app/config/currencies.php +++ b/app/config/currencies.php @@ -1,4 +1,4 @@ - 'Àfrica', - 'AN' => 'Antàrtica', - 'AS' => 'Àsia', - 'EU' => 'Europa', - 'NA' => 'Amèrica del Nord', - 'OC' => 'Oceania', - 'SA' => 'Amèrica del Sud', -]; + 'Àfrica', + 'AN' => 'Antàrtica', + 'AS' => 'Àsia', + 'EU' => 'Europa', + 'NA' => 'Amèrica del Nord', + 'OC' => 'Oceania', + 'SA' => 'Amèrica del Sud', +]; diff --git a/app/config/locale/cat.countries.php b/app/config/locale/cat.countries.php index a6172a9910..30d61f0cde 100644 --- a/app/config/locale/cat.countries.php +++ b/app/config/locale/cat.countries.php @@ -1,197 +1,197 @@ - 'Afganistan', - 'AO' => 'Angola', - 'AL' => 'Albània', - 'AD' => 'Andorra', - 'AE' => 'Unió dels Emirats Àrabs Units', - 'AR' => 'Argentina', - 'AM' => 'Armènia', - 'AG' => 'Antigua o Barbuda', - 'AU' => 'Austràlia', - 'AT' => 'Àustria', - 'AZ' => 'Azerbaidjan', - 'BI' => 'Burundi', - 'BE' => 'Bèlgica', - 'BJ' => 'Benín', - 'BF' => 'Burkina Faso', - 'BD' => 'Bangla Desh', - 'BG' => 'Bulgaria', - 'BH' => 'Bahrain', - 'BS' => 'Bahamas', - 'BA' => 'Bòsnia i Hercegovina', - 'BY' => 'Bielorússia', - 'BZ' => 'Belize', - 'BO' => 'Bolívia', - 'BR' => 'Brasil', - 'BB' => 'Barbados', - 'BN' => 'Brunei', - 'BT' => 'Bhutan', - 'BW' => 'Botswana', - 'CF' => 'República Centreafricana', - 'CA' => 'Canadà', - 'CH' => 'Suïssa', - 'CL' => 'Xile', - 'CN' => 'Xina', - 'CI' => 'Costa d\'Ivori', - 'CM' => 'Camerun', - 'CD' => 'República Democràtica del Congo', - 'CG' => 'República del congo', - 'CO' => 'Colòmbia', - 'KM' => 'Comores', - 'CV' => 'Cap Verd', - 'CR' => 'Costa Rica', - 'CU' => 'Cuba', - 'CY' => 'Xipre', - 'CZ' => 'Txèquia', - 'DE' => 'Alemanya', - 'DJ' => 'Djibouti', - 'DM' => 'Dominica', - 'DK' => 'Dinamarca', - 'DO' => 'República Dominicana', - 'DZ' => 'Argelia', - 'EC' => 'Equador', - 'EG' => 'Egipte', - 'ER' => 'Eritrea', - 'ES' => 'Espanya', - 'EE' => 'Estònia', - 'ET' => 'Etiòpia', - 'FI' => 'Finlàndia', - 'FJ' => 'Fiji', - 'FR' => 'França', - 'FM' => 'Micronèsia', - 'GA' => 'Gabon', - 'GB' => 'Regne Unit', - 'GE' => 'Geòrgia', - 'GH' => 'Ghana', - 'GN' => 'Guinea', - 'GM' => 'Gàmbia', - 'GW' => 'Guinea Bissau', - 'GQ' => 'Guinea Equatorial', - 'GR' => 'Grècia', - 'GD' => 'Granada', - 'GT' => 'Guatemala', - 'GY' => 'Guaiana', - 'HN' => 'Hondures', - 'HR' => 'Croàcia', - 'HT' => 'Haití', - 'HU' => 'Hungria', - 'ID' => 'Indonèsia', - 'IN' => 'Índia', - 'IE' => 'Irlanda', - 'IR' => 'Iran', - 'IQ' => 'Iraq', - 'IS' => 'Islàndia', - 'IL' => 'Israel', - 'IT' => 'Itàlia', - 'JM' => 'Jamaica', - 'JO' => 'Jordà', - 'JP' => 'Japó', - 'KZ' => 'Kazakhstan', - 'KE' => 'Kenya', - 'KG' => 'Kirguizistan', - 'KH' => 'Cambodja', - 'KI' => 'Kiribati', - 'KN' => 'Sant Cristòfol i Neus', - 'KR' => 'Corea del Sud', - 'KW' => 'Kuwait', - 'LA' => 'Laos', - 'LB' => 'Líban', - 'LR' => 'Libèria', - 'LY' => 'Líbia', - 'LC' => 'Santa Llúcia', - 'LI' => 'Liechtenstein', - 'LK' => 'Sri Lanka', - 'LS' => 'Lesoto', - 'LT' => 'Lituània', - 'LU' => 'Luxemburg', - 'LV' => 'Letònia', - 'MA' => 'Marroc', - 'MC' => 'Mònaco', - 'MD' => 'Moldàvia', - 'MG' => 'Madagascar', - 'MV' => 'Maldives', - 'MX' => 'Mèxic', - 'MH' => 'Illes Marshall', - 'MK' => 'Macedònia', - 'ML' => 'Mali', - 'MT' => 'Malta', - 'MM' => 'Myanmar', - 'ME' => 'Montenegro', - 'MN' => 'Mongòlia', - 'MZ' => 'Moçambic', - 'MR' => 'Mauritània', - 'MU' => 'Maurici', - 'MW' => 'Malawi', - 'MY' => 'Malàsia', - 'NA' => 'Namíbia', - 'NE' => 'Níger', - 'NG' => 'Nigèria', - 'NI' => 'Nicaragua', - 'NL' => 'Països Baixos', - 'NO' => 'Noruega', - 'NP' => 'Nepal', - 'NR' => 'Nauru', - 'NZ' => 'Nova Zelanda', - 'OM' => 'Oman', - 'PK' => 'Pakistan', - 'PA' => 'Panamà', - 'PE' => 'Perú', - 'PH' => 'Filipines', - 'PW' => 'Palaos', - 'PG' => 'Papua Nova Guinea', - 'PL' => 'Polònia', - 'KP' => 'Corea del Nord', - 'PT' => 'Portugal', - 'PY' => 'Paraguai', - 'QA' => 'Katar', - 'RO' => 'Romania', - 'RU' => 'Rússia', - 'RW' => 'Rwanda', - 'SA' => 'Aràbia Saudita', - 'SD' => 'Sudan', - 'SN' => 'Senegal', - 'SG' => 'Singapur', - 'SB' => 'Illes Salomó', - 'SL' => 'Sierra Leone', - 'SV' => 'El Salvador', - 'SM' => 'San Marí', - 'SO' => 'Somàlia', - 'RS' => 'Sèrbia', - 'SS' => 'Sudàn del Sud', - 'ST' => 'Santo Tomé y Príncipe', - 'SR' => 'Surinam', - 'SK' => 'Eslovàquia', - 'SI' => 'Eslovènia', - 'SE' => 'Suècia', - 'SZ' => 'Swazilàndia', - 'SC' => 'Seychelles', - 'SY' => 'Síria', - 'TD' => 'Txad', - 'TG' => 'Togo', - 'TH' => 'Tailàndia', - 'TJ' => 'Tadjikistan', - 'TM' => 'Turkmenistan', - 'TL' => 'Timor Oriental', - 'TO' => 'Tonga', - 'TT' => 'Trinitat i Tobago', - 'TN' => 'Tunísia', - 'TR' => 'Turquia', - 'TV' => 'Tuvalu', - 'TZ' => 'Tanzània', - 'UG' => 'Uganda', - 'UA' => 'Ucraïna', - 'UY' => 'Uruguai', - 'US' => 'Estats Units', - 'UZ' => 'Uzbekistan', - 'VA' => 'Ciudat del Vaticà', - 'VC' => 'Saint Vincent i les Grenadines', - 'VE' => 'Veneçuela', - 'VN' => 'Vietnam', - 'VU' => 'Vanuatu', - 'WS' => 'Samoa', - 'YE' => 'Iemen', - 'ZA' => 'Sud-àfrica', - 'ZM' => 'Zàmbia', - 'ZW' => 'Zimbabwe', -]; + 'Afganistan', + 'AO' => 'Angola', + 'AL' => 'Albània', + 'AD' => 'Andorra', + 'AE' => 'Unió dels Emirats Àrabs Units', + 'AR' => 'Argentina', + 'AM' => 'Armènia', + 'AG' => 'Antigua o Barbuda', + 'AU' => 'Austràlia', + 'AT' => 'Àustria', + 'AZ' => 'Azerbaidjan', + 'BI' => 'Burundi', + 'BE' => 'Bèlgica', + 'BJ' => 'Benín', + 'BF' => 'Burkina Faso', + 'BD' => 'Bangla Desh', + 'BG' => 'Bulgaria', + 'BH' => 'Bahrain', + 'BS' => 'Bahamas', + 'BA' => 'Bòsnia i Hercegovina', + 'BY' => 'Bielorússia', + 'BZ' => 'Belize', + 'BO' => 'Bolívia', + 'BR' => 'Brasil', + 'BB' => 'Barbados', + 'BN' => 'Brunei', + 'BT' => 'Bhutan', + 'BW' => 'Botswana', + 'CF' => 'República Centreafricana', + 'CA' => 'Canadà', + 'CH' => 'Suïssa', + 'CL' => 'Xile', + 'CN' => 'Xina', + 'CI' => 'Costa d\'Ivori', + 'CM' => 'Camerun', + 'CD' => 'República Democràtica del Congo', + 'CG' => 'República del congo', + 'CO' => 'Colòmbia', + 'KM' => 'Comores', + 'CV' => 'Cap Verd', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CY' => 'Xipre', + 'CZ' => 'Txèquia', + 'DE' => 'Alemanya', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DK' => 'Dinamarca', + 'DO' => 'República Dominicana', + 'DZ' => 'Argelia', + 'EC' => 'Equador', + 'EG' => 'Egipte', + 'ER' => 'Eritrea', + 'ES' => 'Espanya', + 'EE' => 'Estònia', + 'ET' => 'Etiòpia', + 'FI' => 'Finlàndia', + 'FJ' => 'Fiji', + 'FR' => 'França', + 'FM' => 'Micronèsia', + 'GA' => 'Gabon', + 'GB' => 'Regne Unit', + 'GE' => 'Geòrgia', + 'GH' => 'Ghana', + 'GN' => 'Guinea', + 'GM' => 'Gàmbia', + 'GW' => 'Guinea Bissau', + 'GQ' => 'Guinea Equatorial', + 'GR' => 'Grècia', + 'GD' => 'Granada', + 'GT' => 'Guatemala', + 'GY' => 'Guaiana', + 'HN' => 'Hondures', + 'HR' => 'Croàcia', + 'HT' => 'Haití', + 'HU' => 'Hungria', + 'ID' => 'Indonèsia', + 'IN' => 'Índia', + 'IE' => 'Irlanda', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IS' => 'Islàndia', + 'IL' => 'Israel', + 'IT' => 'Itàlia', + 'JM' => 'Jamaica', + 'JO' => 'Jordà', + 'JP' => 'Japó', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KG' => 'Kirguizistan', + 'KH' => 'Cambodja', + 'KI' => 'Kiribati', + 'KN' => 'Sant Cristòfol i Neus', + 'KR' => 'Corea del Sud', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LB' => 'Líban', + 'LR' => 'Libèria', + 'LY' => 'Líbia', + 'LC' => 'Santa Llúcia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LS' => 'Lesoto', + 'LT' => 'Lituània', + 'LU' => 'Luxemburg', + 'LV' => 'Letònia', + 'MA' => 'Marroc', + 'MC' => 'Mònaco', + 'MD' => 'Moldàvia', + 'MG' => 'Madagascar', + 'MV' => 'Maldives', + 'MX' => 'Mèxic', + 'MH' => 'Illes Marshall', + 'MK' => 'Macedònia', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MM' => 'Myanmar', + 'ME' => 'Montenegro', + 'MN' => 'Mongòlia', + 'MZ' => 'Moçambic', + 'MR' => 'Mauritània', + 'MU' => 'Maurici', + 'MW' => 'Malawi', + 'MY' => 'Malàsia', + 'NA' => 'Namíbia', + 'NE' => 'Níger', + 'NG' => 'Nigèria', + 'NI' => 'Nicaragua', + 'NL' => 'Països Baixos', + 'NO' => 'Noruega', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NZ' => 'Nova Zelanda', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PA' => 'Panamà', + 'PE' => 'Perú', + 'PH' => 'Filipines', + 'PW' => 'Palaos', + 'PG' => 'Papua Nova Guinea', + 'PL' => 'Polònia', + 'KP' => 'Corea del Nord', + 'PT' => 'Portugal', + 'PY' => 'Paraguai', + 'QA' => 'Katar', + 'RO' => 'Romania', + 'RU' => 'Rússia', + 'RW' => 'Rwanda', + 'SA' => 'Aràbia Saudita', + 'SD' => 'Sudan', + 'SN' => 'Senegal', + 'SG' => 'Singapur', + 'SB' => 'Illes Salomó', + 'SL' => 'Sierra Leone', + 'SV' => 'El Salvador', + 'SM' => 'San Marí', + 'SO' => 'Somàlia', + 'RS' => 'Sèrbia', + 'SS' => 'Sudàn del Sud', + 'ST' => 'Santo Tomé y Príncipe', + 'SR' => 'Surinam', + 'SK' => 'Eslovàquia', + 'SI' => 'Eslovènia', + 'SE' => 'Suècia', + 'SZ' => 'Swazilàndia', + 'SC' => 'Seychelles', + 'SY' => 'Síria', + 'TD' => 'Txad', + 'TG' => 'Togo', + 'TH' => 'Tailàndia', + 'TJ' => 'Tadjikistan', + 'TM' => 'Turkmenistan', + 'TL' => 'Timor Oriental', + 'TO' => 'Tonga', + 'TT' => 'Trinitat i Tobago', + 'TN' => 'Tunísia', + 'TR' => 'Turquia', + 'TV' => 'Tuvalu', + 'TZ' => 'Tanzània', + 'UG' => 'Uganda', + 'UA' => 'Ucraïna', + 'UY' => 'Uruguai', + 'US' => 'Estats Units', + 'UZ' => 'Uzbekistan', + 'VA' => 'Ciudat del Vaticà', + 'VC' => 'Saint Vincent i les Grenadines', + 'VE' => 'Veneçuela', + 'VN' => 'Vietnam', + 'VU' => 'Vanuatu', + 'WS' => 'Samoa', + 'YE' => 'Iemen', + 'ZA' => 'Sud-àfrica', + 'ZM' => 'Zàmbia', + 'ZW' => 'Zimbabwe', +]; diff --git a/app/config/locale/cat.php b/app/config/locale/cat.php index 26b50a57c0..718a790961 100644 --- a/app/config/locale/cat.php +++ b/app/config/locale/cat.php @@ -1,21 +1,21 @@ - '"L\'art de ser sabi és l\'art de saber què passar per alt"', // This is the line printed in the homepage and console 'view-source' - 'settings.locale' => 'cat', - 'settings.direction' => 'ltr', - - // Service - Users - 'auth.emails.team' => '%s Equip', - 'auth.emails.confirm.title' => 'Confirmació del compte', - 'auth.emails.confirm.body' => 'cat.email.auth.confirm.tpl', - 'auth.emails.recovery.title' => 'Restablir contrasenya', - 'auth.emails.recovery.body' => 'cat.email.auth.recovery.tpl', - 'auth.emails.invitation.title' => 'Invitació a l\'Equipo %s a %s', - 'auth.emails.invitation.body' => 'cat.email.auth.invitation.tpl', - - 'locale.country.unknown' => 'Desconegut', - - 'countries' => include 'cat.countries.php', - 'continents' => include 'cat.continents.php', -]; + '"L\'art de ser sabi és l\'art de saber què passar per alt"', // This is the line printed in the homepage and console 'view-source' + 'settings.locale' => 'cat', + 'settings.direction' => 'ltr', + + // Service - Users + 'auth.emails.team' => '%s Equip', + 'auth.emails.confirm.title' => 'Confirmació del compte', + 'auth.emails.confirm.body' => 'cat.email.auth.confirm.tpl', + 'auth.emails.recovery.title' => 'Restablir contrasenya', + 'auth.emails.recovery.body' => 'cat.email.auth.recovery.tpl', + 'auth.emails.invitation.title' => 'Invitació a l\'Equipo %s a %s', + 'auth.emails.invitation.body' => 'cat.email.auth.invitation.tpl', + + 'locale.country.unknown' => 'Desconegut', + + 'countries' => include 'cat.countries.php', + 'continents' => include 'cat.continents.php', +]; diff --git a/app/config/locale/fi.continents.php b/app/config/locale/fi.continents.php index 7b405d7616..6f971fb84d 100644 --- a/app/config/locale/fi.continents.php +++ b/app/config/locale/fi.continents.php @@ -8,4 +8,4 @@ return [ 'NA' => 'Pohjois Amerikka', 'OC' => 'Oceania', 'SA' => 'Etelä Amerikka', -]; \ No newline at end of file +]; diff --git a/app/config/locale/fi.countries.php b/app/config/locale/fi.countries.php index 65b9844138..b1aefe05a9 100644 --- a/app/config/locale/fi.countries.php +++ b/app/config/locale/fi.countries.php @@ -195,4 +195,4 @@ return [ 'ZA' => 'Etelä-Afrikka', 'ZM' => 'Sambia', 'ZW' => 'Zimbabwe', -]; \ No newline at end of file +]; diff --git a/app/config/locale/fi.php b/app/config/locale/fi.php index fac6b5586c..76d8e66cb3 100644 --- a/app/config/locale/fi.php +++ b/app/config/locale/fi.php @@ -18,4 +18,4 @@ return [ 'countries' => include 'fi.countries.php', 'continents' => include 'fi.continents.php', -]; \ No newline at end of file +]; diff --git a/app/config/locale/nl.php b/app/config/locale/nl.php index c73341b172..4832cb623a 100644 --- a/app/config/locale/nl.php +++ b/app/config/locale/nl.php @@ -18,4 +18,4 @@ return [ 'countries' => include 'nl.countries.php', 'continents' => include 'nl.continents.php', -]; \ No newline at end of file +]; diff --git a/app/config/locale/tr.countries.php b/app/config/locale/tr.countries.php index e2b2f2f22e..5fd899e911 100644 --- a/app/config/locale/tr.countries.php +++ b/app/config/locale/tr.countries.php @@ -1,198 +1,198 @@ 'Afganistan', - 'AO' => 'Angola', - 'AL' => 'Arnavutluk', - 'AD' => 'Andorra', - 'AE' => 'Birleşik Arap Emirlikleri', - 'AR' => 'Arjantin', - 'AM' => 'Ermenistan', - 'AG' => 'Antigua ve Barbuda', - 'AU' => 'Avustralya', - 'AT' => 'Avusturya', - 'AZ' => 'Azerbaycan', - 'BI' => 'Burundi', - 'BE' => 'Belçika', - 'BJ' => 'Benin', - 'BF' => 'Burkina Faso', - 'BD' => 'Bangladeş', - 'BG' => 'Bulgaristan', - 'BH' => 'Bahreyn', - 'BS' => 'Bahamalar', - 'BA' => 'Bosna Hersek', - 'BY' => 'Beyaz Rusya', - 'BZ' => 'Belize', - 'BO' => 'Bolivya', - 'BR' => 'Brezilya', - 'BB' => 'Barbados', - 'BN' => 'Brunei', - 'BT' => 'Butan', - 'BW' => 'Botsvana', - 'CF' => 'Orta Afrika Cumhuriyeti', - 'CA' => 'Kanada', - 'CH' => 'İsviçre', - 'CL' => 'Şili', - 'CN' => 'Çin', - 'CI' => 'Fildişi Sahili', - 'CM' => 'Kamerun', - 'CD' => 'Kongo - Kinşasa', - 'CG' => 'Kongo - Brazavil', - 'CO' => 'Kolombiya', - 'KM' => 'Komorlar', - 'CV' => 'Cape Verde', - 'CR' => 'Kosta Rika', - 'CU' => 'Küba', - 'CY' => 'Güney Kıbrıs Rum Kesimi', - 'CZ' => 'Çek Cumhuriyeti', - 'DE' => 'Almanya', - 'DJ' => 'Cibuti', - 'DM' => 'Dominika', - 'DK' => 'Danimarka', - 'DO' => 'Dominik Cumhuriyeti', - 'DZ' => 'Cezayir', - 'EC' => 'Ekvador', - 'EG' => 'Mısır', - 'ER' => 'Eritre', - 'ES' => 'İspanya', - 'EE' => 'Estonya', - 'ET' => 'Etiyopya', - 'FI' => 'Finlandiya', - 'FJ' => 'Fiji', - 'FR' => 'Fransa', - 'FM' => 'Mikronezya', - 'GA' => 'Gabon', - 'GB' => 'Birleşik Krallık', - 'GE' => 'Gürcistan', - 'GH' => 'Gana', - 'GN' => 'Gine', - 'GM' => 'Gambiya', - 'GW' => 'Gine-Bissau', - 'GQ' => 'Ekvator Ginesi', - 'GR' => 'Yunanistan', - 'GD' => 'Grenada', - 'GT' => 'Guatemala', - 'GY' => 'Guyana', - 'HN' => 'Honduras', - 'HR' => 'Hırvatistan', - 'HT' => 'Haiti', - 'HU' => 'Macaristan', - 'ID' => 'Endonezya', - 'IN' => 'Hindistan', - 'IE' => 'İrlanda', - 'IR' => 'İran', - 'IQ' => 'Irak', - 'IS' => 'İzlanda', - 'IL' => 'İsrail', - 'IT' => 'İtalya', - 'JM' => 'Jamaika', - 'JO' => 'Ürdün', - 'JP' => 'Japonya', - 'KZ' => 'Kazakistan', - 'KE' => 'Kenya', - 'KG' => 'Kırgızistan', - 'KH' => 'Kamboçya', - 'KI' => 'Kiribati', - 'KN' => 'Saint Kitts ve Nevis', - 'KR' => 'Güney Kore', - 'KW' => 'Kuveyt', - 'LA' => 'Laos', - 'LB' => 'Lübnan', - 'LR' => 'Liberya', - 'LY' => 'Libya', - 'LC' => 'Saint Lucia', - 'LI' => 'Liechtenstein', - 'LK' => 'Sri Lanka', - 'LS' => 'Lesoto', - 'LT' => 'Litvanya', - 'LU' => 'Lüksemburg', - 'LV' => 'Letonya', - 'MA' => 'Fas', - 'MC' => 'Monako', - 'MD' => 'Moldova', - 'MG' => 'Madagaskar', - 'MV' => 'Maldivler', - 'MX' => 'Meksika', - 'MH' => 'Marshall Adaları', - 'MK' => 'Makedonya', - 'ML' => 'Mali', - 'MT' => 'Malta', - 'MM' => 'Myanmar (Burma)', - 'ME' => 'Karadağ', - 'MN' => 'Moğolistan', - 'MZ' => 'Mozambik', - 'MR' => 'Moritanya', - 'MU' => 'Mauritius', - 'MW' => 'Malavi', - 'MY' => 'Malezya', - 'NA' => 'Namibya', - 'NE' => 'Nijer', - 'NG' => 'Nijerya', - 'NI' => 'Nikaragua', - 'NL' => 'Hollanda', - 'NO' => 'Norveç', - 'NP' => 'Nepal', - 'NR' => 'Nauru', - 'NZ' => 'Yeni Zelanda', - 'OM' => 'Umman', - 'PK' => 'Pakistan', - 'PA' => 'Panama', - 'PE' => 'Peru', - 'PH' => 'Filipinler', - 'PW' => 'Palau', - 'PG' => 'Papua Yeni Gine', - 'PL' => 'Polonya', - 'KP' => 'Kuzey Kore', - 'PT' => 'Portekiz', - 'PY' => 'Paraguay', - 'QA' => 'Katar', - 'RO' => 'Romanya', - 'RU' => 'Rusya', - 'RW' => 'Ruanda', - 'SA' => 'Suudi Arabistan', - 'SD' => 'Sudan', - 'SN' => 'Senegal', - 'SG' => 'Singapur', - 'SB' => 'Solomon Adaları', - 'SL' => 'Sierra Leone', - 'SV' => 'El Salvador', - 'SM' => 'San Marino', - 'SO' => 'Somali', - 'RS' => 'Sırbistan', - 'SS' => 'Güney Sudan', - 'ST' => 'São Tomé ve Príncipe', - 'SR' => 'Surinam', - 'SK' => 'Slovakya', - 'SI' => 'Slovenya', - 'SE' => 'İsveç', - 'SZ' => 'Svaziland', - 'SC' => 'Seyşeller', - 'SY' => 'Suriye', - 'TD' => 'Çad', - 'TG' => 'Togo', - 'TH' => 'Tayland', - 'TJ' => 'Tacikistan', - 'TM' => 'Türkmenistan', - 'TL' => 'Timor-Leste', - 'TO' => 'Tonga', - 'TT' => 'Trinidad ve Tobago', - 'TN' => 'Tunus', - 'TR' => 'Türkiye', - 'TV' => 'Tuvalu', - 'TZ' => 'Tanzanya', - 'UG' => 'Uganda', - 'UA' => 'Ukrayna', - 'UY' => 'Uruguay', - 'US' => 'ABD', - 'UZ' => 'Özbekistan', - 'VA' => 'Vatikan', - 'VC' => 'Saint Vincent ve Grenadinler', - 'VE' => 'Venezuela', - 'VN' => 'Vietnam', - 'VU' => 'Vanuatu', - 'WS' => 'Samoa', - 'YE' => 'Yemen', - 'ZA' => 'Güney Afrika', - 'ZM' => 'Zambiya', - 'ZW' => 'Zimbabve', + 'AF' => 'Afganistan', + 'AO' => 'Angola', + 'AL' => 'Arnavutluk', + 'AD' => 'Andorra', + 'AE' => 'Birleşik Arap Emirlikleri', + 'AR' => 'Arjantin', + 'AM' => 'Ermenistan', + 'AG' => 'Antigua ve Barbuda', + 'AU' => 'Avustralya', + 'AT' => 'Avusturya', + 'AZ' => 'Azerbaycan', + 'BI' => 'Burundi', + 'BE' => 'Belçika', + 'BJ' => 'Benin', + 'BF' => 'Burkina Faso', + 'BD' => 'Bangladeş', + 'BG' => 'Bulgaristan', + 'BH' => 'Bahreyn', + 'BS' => 'Bahamalar', + 'BA' => 'Bosna Hersek', + 'BY' => 'Beyaz Rusya', + 'BZ' => 'Belize', + 'BO' => 'Bolivya', + 'BR' => 'Brezilya', + 'BB' => 'Barbados', + 'BN' => 'Brunei', + 'BT' => 'Butan', + 'BW' => 'Botsvana', + 'CF' => 'Orta Afrika Cumhuriyeti', + 'CA' => 'Kanada', + 'CH' => 'İsviçre', + 'CL' => 'Şili', + 'CN' => 'Çin', + 'CI' => 'Fildişi Sahili', + 'CM' => 'Kamerun', + 'CD' => 'Kongo - Kinşasa', + 'CG' => 'Kongo - Brazavil', + 'CO' => 'Kolombiya', + 'KM' => 'Komorlar', + 'CV' => 'Cape Verde', + 'CR' => 'Kosta Rika', + 'CU' => 'Küba', + 'CY' => 'Güney Kıbrıs Rum Kesimi', + 'CZ' => 'Çek Cumhuriyeti', + 'DE' => 'Almanya', + 'DJ' => 'Cibuti', + 'DM' => 'Dominika', + 'DK' => 'Danimarka', + 'DO' => 'Dominik Cumhuriyeti', + 'DZ' => 'Cezayir', + 'EC' => 'Ekvador', + 'EG' => 'Mısır', + 'ER' => 'Eritre', + 'ES' => 'İspanya', + 'EE' => 'Estonya', + 'ET' => 'Etiyopya', + 'FI' => 'Finlandiya', + 'FJ' => 'Fiji', + 'FR' => 'Fransa', + 'FM' => 'Mikronezya', + 'GA' => 'Gabon', + 'GB' => 'Birleşik Krallık', + 'GE' => 'Gürcistan', + 'GH' => 'Gana', + 'GN' => 'Gine', + 'GM' => 'Gambiya', + 'GW' => 'Gine-Bissau', + 'GQ' => 'Ekvator Ginesi', + 'GR' => 'Yunanistan', + 'GD' => 'Grenada', + 'GT' => 'Guatemala', + 'GY' => 'Guyana', + 'HN' => 'Honduras', + 'HR' => 'Hırvatistan', + 'HT' => 'Haiti', + 'HU' => 'Macaristan', + 'ID' => 'Endonezya', + 'IN' => 'Hindistan', + 'IE' => 'İrlanda', + 'IR' => 'İran', + 'IQ' => 'Irak', + 'IS' => 'İzlanda', + 'IL' => 'İsrail', + 'IT' => 'İtalya', + 'JM' => 'Jamaika', + 'JO' => 'Ürdün', + 'JP' => 'Japonya', + 'KZ' => 'Kazakistan', + 'KE' => 'Kenya', + 'KG' => 'Kırgızistan', + 'KH' => 'Kamboçya', + 'KI' => 'Kiribati', + 'KN' => 'Saint Kitts ve Nevis', + 'KR' => 'Güney Kore', + 'KW' => 'Kuveyt', + 'LA' => 'Laos', + 'LB' => 'Lübnan', + 'LR' => 'Liberya', + 'LY' => 'Libya', + 'LC' => 'Saint Lucia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LS' => 'Lesoto', + 'LT' => 'Litvanya', + 'LU' => 'Lüksemburg', + 'LV' => 'Letonya', + 'MA' => 'Fas', + 'MC' => 'Monako', + 'MD' => 'Moldova', + 'MG' => 'Madagaskar', + 'MV' => 'Maldivler', + 'MX' => 'Meksika', + 'MH' => 'Marshall Adaları', + 'MK' => 'Makedonya', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MM' => 'Myanmar (Burma)', + 'ME' => 'Karadağ', + 'MN' => 'Moğolistan', + 'MZ' => 'Mozambik', + 'MR' => 'Moritanya', + 'MU' => 'Mauritius', + 'MW' => 'Malavi', + 'MY' => 'Malezya', + 'NA' => 'Namibya', + 'NE' => 'Nijer', + 'NG' => 'Nijerya', + 'NI' => 'Nikaragua', + 'NL' => 'Hollanda', + 'NO' => 'Norveç', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NZ' => 'Yeni Zelanda', + 'OM' => 'Umman', + 'PK' => 'Pakistan', + 'PA' => 'Panama', + 'PE' => 'Peru', + 'PH' => 'Filipinler', + 'PW' => 'Palau', + 'PG' => 'Papua Yeni Gine', + 'PL' => 'Polonya', + 'KP' => 'Kuzey Kore', + 'PT' => 'Portekiz', + 'PY' => 'Paraguay', + 'QA' => 'Katar', + 'RO' => 'Romanya', + 'RU' => 'Rusya', + 'RW' => 'Ruanda', + 'SA' => 'Suudi Arabistan', + 'SD' => 'Sudan', + 'SN' => 'Senegal', + 'SG' => 'Singapur', + 'SB' => 'Solomon Adaları', + 'SL' => 'Sierra Leone', + 'SV' => 'El Salvador', + 'SM' => 'San Marino', + 'SO' => 'Somali', + 'RS' => 'Sırbistan', + 'SS' => 'Güney Sudan', + 'ST' => 'São Tomé ve Príncipe', + 'SR' => 'Surinam', + 'SK' => 'Slovakya', + 'SI' => 'Slovenya', + 'SE' => 'İsveç', + 'SZ' => 'Svaziland', + 'SC' => 'Seyşeller', + 'SY' => 'Suriye', + 'TD' => 'Çad', + 'TG' => 'Togo', + 'TH' => 'Tayland', + 'TJ' => 'Tacikistan', + 'TM' => 'Türkmenistan', + 'TL' => 'Timor-Leste', + 'TO' => 'Tonga', + 'TT' => 'Trinidad ve Tobago', + 'TN' => 'Tunus', + 'TR' => 'Türkiye', + 'TV' => 'Tuvalu', + 'TZ' => 'Tanzanya', + 'UG' => 'Uganda', + 'UA' => 'Ukrayna', + 'UY' => 'Uruguay', + 'US' => 'ABD', + 'UZ' => 'Özbekistan', + 'VA' => 'Vatikan', + 'VC' => 'Saint Vincent ve Grenadinler', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'VU' => 'Vanuatu', + 'WS' => 'Samoa', + 'YE' => 'Yemen', + 'ZA' => 'Güney Afrika', + 'ZM' => 'Zambiya', + 'ZW' => 'Zimbabve', ]; diff --git a/app/config/locale/ua.continents.php b/app/config/locale/ua.continents.php index a9646ca140..9f7e254e2a 100644 --- a/app/config/locale/ua.continents.php +++ b/app/config/locale/ua.continents.php @@ -7,4 +7,4 @@ 'NA' => 'Північна Америка', 'OC' => 'Океанія', 'SA' => 'Південна Америка', -]; \ No newline at end of file +]; diff --git a/app/config/locale/ua.countries.php b/app/config/locale/ua.countries.php index eae8e8ebd3..2308b7c0a5 100644 --- a/app/config/locale/ua.countries.php +++ b/app/config/locale/ua.countries.php @@ -194,4 +194,4 @@ 'ZA' => 'Південна Африка', 'ZM' => 'Замбія', 'ZW' => 'Зімбабве', -]; \ No newline at end of file +]; diff --git a/app/config/providers.php b/app/config/providers.php index 9e5f329ebb..01b7b6b429 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -4,7 +4,7 @@ return [ 'bitbucket' => [ 'developers' => 'https://developer.atlassian.com/bitbucket', 'icon' => 'icon-bitbucket', - 'enabled' => false, + 'enabled' => true, ], 'facebook' => [ 'developers' => 'https://developers.facebook.com/', diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 68ea25885a..28bfbb1770 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -1,4 +1,3 @@ - post('/v1/auth/register') ->action( function ($email, $password, $confirm, $success, $failure, $name) use ($request, $response, $register, $audit, $projectDB, $project, $webhook) { if ('console' === $project->getUid()) { - $whitlistEmails = $project->getAttribute('authWhitelistEmails'); - $whitlistIPs = $project->getAttribute('authWhitelistIPs'); - $whitlistDomains = $project->getAttribute('authWhitelistDomains'); + $whitlistEmails = $project->getAttribute('authWhitelistEmails'); + $whitlistIPs = $project->getAttribute('authWhitelistIPs'); + $whitlistDomains = $project->getAttribute('authWhitelistDomains'); if (!empty($whitlistEmails) && !in_array($email, $whitlistEmails)) { throw new Exception('Console registration is restricted to specific emails. Contact your administrator for more information.', 401); @@ -61,11 +60,11 @@ $utopia->post('/v1/auth/register') throw new Exception('Console registration is restricted to specific IPs. Contact your administrator for more information.', 401); } - if (!empty($whitlistDomains) && !in_array(substr(strrchr($email, '@'), 1), $whitlistDomains)) { + if (!empty($whitlistDomains) && !in_array(substr(strrchr($email, "@"), 1), $whitlistDomains)) { throw new Exception('Console registration is restricted to specific domains. Contact your administrator for more information.', 401); } } - + $profile = $projectDB->getCollection([ // Get user by email address 'limit' => 1, 'first' => true, @@ -77,7 +76,7 @@ $utopia->post('/v1/auth/register') if (!empty($profile)) { if ($failure) { - $response->redirect($failure.'?message=User already registered'); + $response->redirect($failure . '?message=User already registered'); return; } @@ -778,7 +777,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect') } $oauthID = $oauth->getUserID($accessToken); - + if (empty($oauthID)) { if (!empty($state['failure'])) { $response->redirect($state['failure'], 301, 0); @@ -788,7 +787,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect') } $current = Auth::tokenVerify($user->getAttribute('tokens', []), Auth::TOKEN_TYPE_LOGIN, Auth::$secret); - + if ($current) { $projectDB->deleteDocument($current); //throw new Exception('User already logged in', 401); } @@ -802,6 +801,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect') ], ]) : $user; + if (empty($user)) { // No user logged in or with oauth provider ID, create new one or connect with account with same email $name = $oauth->getUserName($accessToken); $email = $oauth->getUserEmail($accessToken); diff --git a/docs/AddOAuthProvider.md b/docs/AddOAuthProvider.md index b5a04da2ef..bca7d3bc82 100644 --- a/docs/AddOAuthProvider.md +++ b/docs/AddOAuthProvider.md @@ -31,7 +31,7 @@ Once you have finished setting up all the metadata for the new provider, you nee Create a new class that extends the basic OAuth provider abstract class in this location: ```bash -src/Auth/OAuth/ProviderName +./src/Auth/OAuth/ProviderName ``` Note that the class name should start with a capital letter as PHP FIG standards suggest. diff --git a/public/images/oauth/bitbucket.png b/public/images/oauth/bitbucket.png new file mode 100644 index 0000000000..8c7442e9e7 Binary files /dev/null and b/public/images/oauth/bitbucket.png differ diff --git a/public/images/oauth/google.png b/public/images/oauth/google.png index cd60f3a111..de66a7b99c 100644 Binary files a/public/images/oauth/google.png and b/public/images/oauth/google.png differ diff --git a/src/Auth/OAuth/Bitbucket.php b/src/Auth/OAuth/Bitbucket.php new file mode 100644 index 0000000000..b0e9969c1b --- /dev/null +++ b/src/Auth/OAuth/Bitbucket.php @@ -0,0 +1,132 @@ +appID). + '&state=' . urlencode(json_encode($this->state)). + '&response_type=code'; + } + + /** + * @param string $code + * + * @return string + */ + public function getAccessToken(string $code): string + { + // Required as per Bitbucket Spec. + $headers[] = 'Content-Type: application/x-www-form-urlencoded'; + + $accessToken = $this->request( + 'POST', + 'https://bitbucket.org/site/oauth2/access_token', + $headers, + 'code=' . urlencode($code) . + '&client_id=' . urlencode($this->appID) . + '&client_secret=' . urlencode($this->appSecret). + '&grant_type=authorization_code' + ); + + $accessToken = json_decode($accessToken, true); + + if (isset($accessToken['access_token'])) { + return $accessToken['access_token']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserID(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['uuid'])) { + return $user['uuid']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['email'])) { + return $user['email']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserName(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['display_name'])) { + return $user['display_name']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken): array + { + if (empty($this->user)) { + $user = $this->request('GET', 'https://api.bitbucket.org/2.0/user?access_token='.urlencode($accessToken)); + $this->user = json_decode($user, true); + + $email = $this->request('GET', 'https://api.bitbucket.org/2.0/user/emails?access_token='.urlencode($accessToken)); + $this->user['email'] = json_decode($email, true)['values'][0]['email']; + + // var_dump($user); + // exit(); + } + return $this->user; + } +}