Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Remove RU-localization #283

Merged
merged 2 commits into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run Laravel Pint
run: composer pint-check
- name: Run checks of code style via Laravel Pint
run: composer cs-check
25 changes: 0 additions & 25 deletions app/Http/Controllers/LanguageController.php

This file was deleted.

1 change: 0 additions & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\CheckLanguage::class,
],

'api' => [
Expand Down
39 changes: 0 additions & 39 deletions app/Http/Middleware/CheckLanguage.php

This file was deleted.

1 change: 1 addition & 0 deletions app/Http/Requests/NoteCreateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function getPassword(): ?string
*/
public function getExpirationDate(): ?string
{
// TODO Move `1_hour` to reference
return in_array($this->get(self::FIELD_EXPIRATION_DATE), ['1_hour', '1_day', '1_week', '1_month'])
? $this->get(self::FIELD_EXPIRATION_DATE)
: null;
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"scripts": {
"phpunit": "@php ./vendor/bin/phpunit ./tests --no-coverage --color=always",
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi --verbose",
"pint-check": "@php ./vendor/bin/pint --test --config vendor/gomzyakov/php-code-style/pint.json",
"pint-fix": "@php ./vendor/bin/pint --config vendor/gomzyakov/php-code-style/pint.json",
"cs-check": "@php ./vendor/bin/pint --test --config vendor/gomzyakov/php-code-style/pint.json",
"cs-fix": "@php ./vendor/bin/pint --config vendor/gomzyakov/php-code-style/pint.json",
"rector-check": "@php ./vendor/bin/rector process --dry-run",
"test": [
"@pint-check",
"@cs-check",
"@phpstan",
"@phpunit"
],
Expand Down
6 changes: 0 additions & 6 deletions config/languages.php

This file was deleted.

6 changes: 0 additions & 6 deletions resources/lang/en/common.php

This file was deleted.

18 changes: 0 additions & 18 deletions resources/lang/en/home.php

This file was deleted.

8 changes: 0 additions & 8 deletions resources/lang/en/navbar.php

This file was deleted.

13 changes: 0 additions & 13 deletions resources/lang/en/note_create.php

This file was deleted.

6 changes: 0 additions & 6 deletions resources/lang/ru/common.php

This file was deleted.

18 changes: 0 additions & 18 deletions resources/lang/ru/home.php

This file was deleted.

8 changes: 0 additions & 8 deletions resources/lang/ru/navbar.php

This file was deleted.

13 changes: 0 additions & 13 deletions resources/lang/ru/note_create.php

This file was deleted.

6 changes: 3 additions & 3 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@extends('layout.app')

@section('title', trans('common.head_title'))
@section('title', 'Create notes that will self-destruct after being read')

@section('content')

Expand All @@ -14,7 +14,7 @@
<div class="row mt-2 mb-4">
<div class="col-md-8 mx-auto">
<div id="textareaHelp" class="form-text">
{{ __('home.additional_settings.prefix') }} <a href="{{ route('page.note.new') }}">{{ __('home.additional_settings.link') }}</a>.
You can create a secret note with <a href="{{ route('page.note.new') }}">additional settings</a>.
</div>
</div>
</div>
Expand All @@ -23,7 +23,7 @@
<div class="col-8">
<div class="d-grid">
<button id="create_note_form__submit_btn" type="submit" class="btn btn-lg btn-primary">
{{ __('home.create_btn') }}
Create note
</button>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/home/layout/cases.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container py-5 d-none d-md-block" id="custom-cards">
<div class="row py-2 py-md-4 justify-content-center">
<div class="col-8">
<h2>{{ __('home.cases.title') }}</h2>
<h2>How can I use Secretic?</h2>
</div>
</div>
<div class="row py-2 py-md-4 justify-content-center">
Expand All @@ -10,7 +10,7 @@
style="background: url('{{ asset('assets/unsplash-photo-1.jpg') }}') center;">
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
<h3 class="pt-1 mt-3 mb-4 lh-1 fw-bold">
{{ __('home.cases.card_1_title') }}
Share passwords securely at work
</h3>
<ul class="d-flex list-unstyled mt-auto">
<li class="d-flex align-items-center ms-auto">
Expand All @@ -35,7 +35,7 @@
style="background: url('{{ asset('assets/unsplash-photo-2.jpg') }}') center;">
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
<h3 class="pt-1 mt-3 mb-4 lh-1 fw-bold">
{{ __('home.cases.card_2_title') }}
Give out one-time promo codes
</h3>
<ul class="d-flex list-unstyled mt-auto">
<li class="d-flex align-items-center ms-auto">
Expand All @@ -60,7 +60,7 @@
style="background: url('{{ asset('assets/unsplash-photo-3.jpg') }}') center;">
<div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1">
<h3 class="pt-1 mt-3 mb-4 lh-1 fw-bold">
{{ __('home.cases.card_3_title') }}
Share secrets with friends
</h3>
<ul class="d-flex list-unstyled mt-auto">
<li class="d-flex align-items-center ms-auto">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/layout/app.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="{{ App::currentLocale() }}">
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>@yield('title', trans('common.head_title')) &mdash; Secretic</title>
<meta name="description" content="Secretic - зашифрованные и самоуничтожающиеся заметки">
<title>@yield('title', 'Create secret note') &mdash; Secretic</title>
<meta name="description" content="Share a confidential note via a web link that will self-destruct after it is read by your intended recipient.">

<!-- Favicons -->
<link rel="apple-touch-icon" href="{{ asset('favicon/apple-touch-icon.png') }}" sizes="180x180">
Expand Down
28 changes: 5 additions & 23 deletions resources/views/layout/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</li>
<li class="nav-item d-none d-md-block">
<a href="{{ route('home') }}" class="nav-link link-secondary ps-0 pe-2 px-md-2">
{{ __('navbar.home') }}
Home
</a>
</li>
<li class="nav-item">
Expand All @@ -35,30 +35,12 @@
</a>
</li>

{{-- <li class="nav-item">--}}
{{-- <a href="{{ route('about') }}" class="nav-link link-secondary px-2">--}}
{{-- {{ __('navbar.about') }}--}}
{{-- </a>--}}
{{-- </li>--}}

<li class="nav-item dropdown">
<a class="nav-link link-secondary px-2 dropdown-toggle" href="#" id="navbarDropdownMenuLink"
role="button"
data-bs-toggle="dropdown" aria-expanded="false">
{{ Config::get('languages')[App::currentLocale()] }}
<li class="nav-item">
<a href="{{ route('home').'#about' }}" class="nav-link link-secondary px-2">
About
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
@foreach (Config::get('languages') as $lang => $language)
@if ($lang != App::currentLocale())
<li>
<a class="dropdown-item" href="{{ route('lang.switch', $lang) }}">
{{ $language }}
</a>
</li>
@endif
@endforeach
</ul>
</li>

</ul>
</div>
</div>
Expand Down
27 changes: 7 additions & 20 deletions resources/views/layout/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,17 @@
<a class="ml-0 navbar-brand" href="{{ route('home') }}">
Secretic
</a>
<span class="navbar-text d-none d-md-inline">{{ __('navbar.text') }}</span>
<span class="navbar-text d-none d-md-inline">Send notes that will self-destruct after being read.</span>
</div>
<div class="col-3 d-none d-md-block">
<ul class="nav float-end">
<li class="nav-item text-end">
<a class="nav-link text-dark" href="{{ route('page.note.new') }}">
{{ __('navbar.new_note') }}
</a>
</li>
{{-- <li class="nav-item text-end">--}}
{{-- <a class="nav-link text-dark" href="{{ route('page.note.new') }}">--}}
{{-- New note--}}
{{-- </a>--}}
{{-- </li>--}}
<li class="nav-item dropdown text-end">
<a class="nav-link dropdown-toggle text-dark" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ Config::get('languages')[App::currentLocale()] }}
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
@foreach (Config::get('languages') as $lang => $language)
@if ($lang != App::currentLocale())
<li>
<a class="dropdown-item" href="{{ route('lang.switch', $lang) }}">
{{ $language }}
</a>
</li>
@endif
@endforeach
</ul>
<a href="{{ route('page.note.new') }}" class="btn btn-outline-success" type="submit">New note</a>
</li>
</ul>
</div>
Expand Down
14 changes: 7 additions & 7 deletions resources/views/note/layout/row-params.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="form-floating">
<select class="form-select" name="expiration_date" id="expiration_date"
aria-label="select example">
<option selected>{{ __('note_create.expiration.never') }}</option>
<option value="1_hour">{{ __('note_create.expiration.1_hour') }}</option>
<option value="1_day">{{ __('note_create.expiration.1_day') }}</option>
<option value="1_week">{{ __('note_create.expiration.1_week') }}</option>
<option value="1_month">{{ __('note_create.expiration.1_month') }}</option>
<option selected>Never</option>
<option value="1_hour">1 hour</option>
<option value="1_day">1 day</option>
<option value="1_week">1 week</option>
<option value="1_month">1 month</option>
</select>
<label for="expiration_date">{{ __('note_create.expiration.title') }}</label>
<label for="expiration_date">Expiration date</label>
</div>
</div>
<div class="col-4">
Expand All @@ -19,7 +19,7 @@
id="password_input"
type="password"
placeholder="Password">
<label for="password_input">{{ __('note_create.password_placeholder') }}</label>
<label for="password_input">Password (optional)</label>

@error('encrypt_password')
<div class="py-2 text-red-500">
Expand Down
Loading