Skip to content

Commit

Permalink
Merge pull request #685 from eerison/Adding_translation_in_the_pipelines
Browse files Browse the repository at this point in the history
Adding translation in the pipelines
  • Loading branch information
eerison authored Aug 13, 2022
2 parents 42a176d + 7222f83 commit 3b1e766
Show file tree
Hide file tree
Showing 33 changed files with 293 additions and 424 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
- 'container'
- 'rector'
- 'twig'
- 'translation en'
- 'translation pt_BR'
needs: build
container:
image: 3lever/php:8.1.8-fpm-postgresql-dev
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
"@lint:ecs",
"@lint:rector",
"@lint:twig",
"@lint:container"
"@lint:container",
"@lint:translation"
],
"db:fixtures": "bin/console hautelook:fixtures:load --no-interaction",
"db:migration:diff": "bin/console make:migration",
Expand All @@ -129,6 +130,7 @@
"lint:twig": "php bin/console lint:twig templates",
"lint:container": "php bin/console lint:container",
"lint:phpstan": "vendor/bin/phpstan analyse --ansi --memory-limit=-1 --debug",
"lint:translation": "php bin/console debug:translation --all --only-missing",
"prod": [
"@composer install --no-ansi --prefer-dist --no-dev --no-interaction --no-plugins --no-progress --no-scripts --optimize-autoloader",
"@composer dump-autoload --optimize --no-dev"
Expand Down
1 change: 0 additions & 1 deletion src/Form/CertificationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Certification::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/EducationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Education::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/ExperienceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Experience::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/ProfileType.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => User::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/SkillType.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Skill::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/UserLanguageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => UserLanguage::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion src/Form/UserSocialNetworkingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => UserSocialNetworking::class,
'translation_domain' => 'MyProfile',
]);
}
}
1 change: 0 additions & 1 deletion templates/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% trans_default_domain 'MyProfile' %}
<!DOCTYPE html>
<html>
<head>
Expand Down
2 changes: 0 additions & 2 deletions templates/default/partials/about.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<section id="about" class="about-section section-padding scrollspy">
<div class="section">
<div class="container">
Expand Down
2 changes: 0 additions & 2 deletions templates/default/partials/navegation.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<header class="header">
<nav class="navbar is-white navbar-custom" role="navigation">
<div class="container">
Expand Down
2 changes: 0 additions & 2 deletions templates/default/partials/resume.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<section id="resume" class="resume-section section-padding scrollspy">
<div class="section">
<div class="container">
Expand Down
2 changes: 0 additions & 2 deletions templates/default/partials/skills.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<section id="skills" class="skills-section section-padding scrollspy">
<div class="section">
<div class="container">
Expand Down
2 changes: 0 additions & 2 deletions templates/profile/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<!DOCTYPE html>
<html>
<head>
Expand Down
1 change: 0 additions & 1 deletion templates/profile/certification.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}

{% block title 'form.certification.head.title'|trans %}
{% block body %}
Expand Down
1 change: 0 additions & 1 deletion templates/profile/education.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}

{% block title 'form.education.head.title'|trans %}
{% block body %}
Expand Down
1 change: 0 additions & 1 deletion templates/profile/experience.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}

{% block title %}{{'form.experience.head.title'|trans}}{% endblock %}
{% block body %}
Expand Down
2 changes: 0 additions & 2 deletions templates/profile/partial/form/delete_modal.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<script>
function openModalRemoveItem(path, csrf_token) {
$modal = document.getElementById("model_remove_item");
Expand Down
2 changes: 0 additions & 2 deletions templates/profile/partial/form/empty_list.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% trans_default_domain 'MyProfile' %}

<div class="section is-multiline has-text-centered" id="empty-list">
<div class="column is-half is-offset-one-quarter">
<div class="is-size-5">
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/partial/form/submit_button.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain 'MyProfile' %}


{% set current_router = app.request.attributes.get('_route') %}
{% set icon = 'pencil' %}
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/partial/navegation/about.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain 'MyProfile' %}


<div class="container">
<div class="columns is-multiline is-mobile is-centered">
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/partial/navegation/main.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain 'MyProfile' %}


<section class="hero is-medium has-background has-background-dark">
<img
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/partial/navegation/menu.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain 'MyProfile' %}


{% set current_router = app.request.attributes.get('_route') %}

Expand Down
2 changes: 1 addition & 1 deletion templates/profile/partial/navegation/navbar.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain 'MyProfile' %}

{% set current_router = app.request.attributes.get('_route') %}
{% set current_locale = app.request.get('_route_params')['_locale'] %}

Expand Down
1 change: 0 additions & 1 deletion templates/profile/save.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}

{% block title %}{{title|trans}}{% endblock %}
{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/skill.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}


{% block title %}{{'form.skill.head.title'|trans}}{% endblock %}
{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/user-social-network.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}


{% block title %}{{'form.social_network.head.title'|trans}}{% endblock %}
{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion templates/profile/user_language.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'profile/base.html.twig' %}
{% trans_default_domain 'MyProfile' %}


{% block title %}{{'form.language.head.title'|trans}}{% endblock %}

Expand Down
146 changes: 0 additions & 146 deletions translations/MyProfile.en.yml

This file was deleted.

Loading

0 comments on commit 3b1e766

Please sign in to comment.