Skip to content

Commit

Permalink
Merge pull request #56 from jorge-vitrubio/master
Browse files Browse the repository at this point in the history
loading scripts and language capabilities
  • Loading branch information
kevinruscoe authored Apr 22, 2024
2 parents 3166fd5 + ae37dff commit d5abcc1
Show file tree
Hide file tree
Showing 14 changed files with 269 additions and 2 deletions.
Empty file modified LICENSE
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
7 changes: 5 additions & 2 deletions StarRatingField.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ public function render_field($field)
public function input_admin_enqueue_scripts()
{
$dir = plugin_dir_url(__FILE__);

wp_enqueue_script('acf-input-star_rating', "{$dir}js/input.js");
//https://github.com/jonpxpx/acf-star-rating-field/blob/66734ccb957e4dd41f858322a10c1ea6f52df503/StarRatingField.php#L157
//https://github.com/kevinruscoe/acf-star-rating-field/issues/55#issuecomment-2023004441
if( get_post_type() !== 'acf-field-group' ){
wp_enqueue_script('acf-input-star_rating', "{$dir}js/input.js");
}
wp_enqueue_style(
'font-awesome',
"//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"
Expand Down
Empty file modified acf-star_rating_field.php
100755 → 100644
Empty file.
Empty file modified composer.json
100755 → 100644
Empty file.
Empty file modified css/input.css
100755 → 100644
Empty file.
Empty file modified js/input.js
100755 → 100644
Empty file.
Binary file added lang/acf-star-rating-field.mo
Binary file not shown.
88 changes: 88 additions & 0 deletions lang/acf-star-rating-field.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
msgid ""
msgstr ""
"Project-Id-Version: ACF Star Rating Field\n"
"POT-Creation-Date: 2024-04-16 11:48+0200\n"
"PO-Revision-Date: 2024-04-16 11:48+0200\n"
"Last-Translator: \n"
"Language-Team: https://github.com/kevinruscoe/acf-star-rating-field\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"

#: StarRatingField.php:20
msgid "Star Rating"
msgstr ""

#: StarRatingField.php:29
msgid "Error! Please enter a higher value"
msgstr ""

#: StarRatingField.php:51
msgid "Maximum Rating"
msgstr ""

#: StarRatingField.php:52
msgid "Maximum number of stars"
msgstr ""

#: StarRatingField.php:58
msgid "Return Type"
msgstr ""

#: StarRatingField.php:59
msgid "What should be returned?"
msgstr ""

#: StarRatingField.php:63
msgid "Number"
msgstr ""

#: StarRatingField.php:64
msgid "List (unstyled)"
msgstr ""

#: StarRatingField.php:65
msgid "List (fa-awesome)"
msgstr ""

#: StarRatingField.php:71
msgid "Allow Half Rating"
msgstr ""

#: StarRatingField.php:72
msgid "Allow half ratings?"
msgstr ""

#: StarRatingField.php:78
msgid "Theme"
msgstr ""

#: StarRatingField.php:79
msgid "Select theme?"
msgstr ""

#: StarRatingField.php:82
msgid "Default"
msgstr ""

#: StarRatingField.php:83
msgid "Color"
msgstr ""

#: StarRatingField.php:134
msgid "Clear"
msgstr ""

#: StarRatingField.php:286
msgid "The value is too large!"
msgstr ""

#: StarRatingField.php:290
#, php-format
msgid "Please enter a value clicking on stars form 1 to %s"
msgstr ""
Binary file added lang/ca.mo
Binary file not shown.
88 changes: 88 additions & 0 deletions lang/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
msgid ""
msgstr ""
"Project-Id-Version: ACF Star Rating Field\n"
"POT-Creation-Date: 2024-04-16 11:48+0200\n"
"PO-Revision-Date: 2024-04-16 12:20+0200\n"
"Last-Translator: \n"
"Language-Team: https://github.com/kevinruscoe/acf-star-rating-field\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"

#: StarRatingField.php:20
msgid "Star Rating"
msgstr "Valoració de estrelles"

#: StarRatingField.php:29
msgid "Error! Please enter a higher value"
msgstr "Error! Introduïu un valor més alt"

#: StarRatingField.php:51
msgid "Maximum Rating"
msgstr "Puntuació màxima"

#: StarRatingField.php:52
msgid "Maximum number of stars"
msgstr "Nombre màxim d'estrelles"

#: StarRatingField.php:58
msgid "Return Type"
msgstr "Tipus de retorn"

#: StarRatingField.php:59
msgid "What should be returned?"
msgstr "Què s'ha de retornar?"

#: StarRatingField.php:63
msgid "Number"
msgstr "Nombre"

#: StarRatingField.php:64
msgid "List (unstyled)"
msgstr "Llista (sense estils)"

#: StarRatingField.php:65
msgid "List (fa-awesome)"
msgstr "Llista (fa-awesome)"

#: StarRatingField.php:71
msgid "Allow Half Rating"
msgstr "Permet mitja valoració"

#: StarRatingField.php:72
msgid "Allow half ratings?"
msgstr "Voleu permetre la meitat a les puntuacions?"

#: StarRatingField.php:78
msgid "Theme"
msgstr "Tema"

#: StarRatingField.php:79
msgid "Select theme?"
msgstr "Voleu seleccionar el tema?"

#: StarRatingField.php:82
msgid "Default"
msgstr "Per defecte"

#: StarRatingField.php:83
msgid "Color"
msgstr "Color"

#: StarRatingField.php:134
msgid "Clear"
msgstr "Neteja"

#: StarRatingField.php:286
msgid "The value is too large!"
msgstr "El valor és massa gran!"

#: StarRatingField.php:290
#, php-format
msgid "Please enter a value clicking on stars form 1 to %s"
msgstr "Introduïu un valor en fer clic a les estrelles des de 1 fins a %s"
Binary file added lang/es_ES.mo
Binary file not shown.
88 changes: 88 additions & 0 deletions lang/es_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
msgid ""
msgstr ""
"Project-Id-Version: ACF Star Rating Field\n"
"POT-Creation-Date: 2024-04-16 11:48+0200\n"
"PO-Revision-Date: 2024-04-16 11:54+0200\n"
"Last-Translator: \n"
"Language-Team: https://github.com/kevinruscoe/acf-star-rating-field\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-SearchPath-0: .\n"

#: StarRatingField.php:20
msgid "Star Rating"
msgstr "Puntuación estrellas"

#: StarRatingField.php:29
msgid "Error! Please enter a higher value"
msgstr "¡Error! Por favor introduce un valor mayor"

#: StarRatingField.php:51
msgid "Maximum Rating"
msgstr "Puntuación máxima"

#: StarRatingField.php:52
msgid "Maximum number of stars"
msgstr "Número máximo de estrellas"

#: StarRatingField.php:58
msgid "Return Type"
msgstr "Tipo de retorno"

#: StarRatingField.php:59
msgid "What should be returned?"
msgstr "¿Que debería devolver?"

#: StarRatingField.php:63
msgid "Number"
msgstr "Número"

#: StarRatingField.php:64
msgid "List (unstyled)"
msgstr "Lista (sin estilos)"

#: StarRatingField.php:65
msgid "List (fa-awesome)"
msgstr "Lista (fa-awesome)"

#: StarRatingField.php:71
msgid "Allow Half Rating"
msgstr "Permitir media puntuación"

#: StarRatingField.php:72
msgid "Allow half ratings?"
msgstr "¿Quieres permitir medias puntuaciones?"

#: StarRatingField.php:78
msgid "Theme"
msgstr "Tema"

#: StarRatingField.php:79
msgid "Select theme?"
msgstr "¿Seleccionar el tema?"

#: StarRatingField.php:82
msgid "Default"
msgstr "Por defecto"

#: StarRatingField.php:83
msgid "Color"
msgstr "Color"

#: StarRatingField.php:134
msgid "Clear"
msgstr "Limpiar"

#: StarRatingField.php:286
msgid "The value is too large!"
msgstr "¡El valor es demasiado alto!"

#: StarRatingField.php:290
#, php-format
msgid "Please enter a value clicking on stars form 1 to %s"
msgstr "Por favor, introduce un valor haciendo clic en las estrellas desde la 1 hasta %s"
Empty file modified readme.txt
100755 → 100644
Empty file.

0 comments on commit d5abcc1

Please sign in to comment.