immosquare-translate 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/immosquare-translate/translator.rb +5 -2
- data/lib/immosquare-translate/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f808fdd6b3f1a7432dfeb45bce124db9d13bab1c182841e93aa6bee84adb26a8
|
4
|
+
data.tar.gz: f71fc6236e855c048a0363fd97298f0ff7032f224296a6379b06278253173bec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b86b7ca922a1af6c4f9011f18e3cdddd601ad45287e63ae2c065423c73e7ce6555ffd3935ed001342baf7e281724cde2198ba6273dd7d2cd99ced02fdaa879
|
7
|
+
data.tar.gz: db493502309a3dd33639da02b87ff5bb27df06c0a9e2173772910a6e596f78ae6243cb6c8b8beb98ccb59aa3725f4ca1d0b96154adb260ca9fba7fa1ef8c7283
|
@@ -57,8 +57,10 @@ module ImmosquareTranslate
|
|
57
57
|
"Rules to respect:\n" \
|
58
58
|
"- Use the inputted ISO codes for specifying languages.\n" \
|
59
59
|
"- Respond with an array of flat objects in JSON (minified, without any extraneous characters or formatting).\n" \
|
60
|
-
"- Format the translation output as a
|
61
|
-
"-
|
60
|
+
"- Format the translation output as a direct array of objects, where each object contains translations for one input string.\n" \
|
61
|
+
"- Each object in the array should have language codes as keys and translated text as values.\n" \
|
62
|
+
"- Ensure that the output does not include markdown (```json) or any other formatting characters.\n" \
|
63
|
+
"- Adhere to the JSON structure meticulously.\n" \
|
62
64
|
"- Correct any spelling or grammatical errors in the source text before translating.\n" \
|
63
65
|
"- If the source language is also a target language, include the corrected version of the sentence for that language.\n" \
|
64
66
|
"- If string to translate is html, you should return the translated html.\n" \
|
@@ -124,6 +126,7 @@ module ImmosquareTranslate
|
|
124
126
|
## On s'assure de ne renvoyer que les locales demandées
|
125
127
|
## car l'API peut renvoyer des locales non demandées...
|
126
128
|
##============================================================##
|
129
|
+
|
127
130
|
datas = JSON.parse(choice["message"]["content"])
|
128
131
|
datas.map do |hash|
|
129
132
|
hash
|