commit 2f9773d6d91d122ca5f5db255d374b69fb686761
parent a8b0e92a083f3c9cdde811c8f75387f4fcf8045f
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date: Wed, 16 Mar 2011 10:32:13 +0100
Merge branch 'master' of https://github.com/jsmaniac/2011-m1s2-ter
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/PtiClic/src/org/pticlic/games/BaseGame.java b/code/PtiClic/src/org/pticlic/games/BaseGame.java
@@ -184,7 +184,7 @@ public class BaseGame extends Activity implements OnClickListener {
// TODO : A enlever lorsque l'on aura toutes les images des relations.
try {
r1.setOnClickListener(this);
- rn1.setText(r.getRelationName(game.getCat1()));
+ rn1.setText(String.format(r.getRelationName(game.getCat1()), ((TextView)findViewById(R.id.mainWord)).getText()));
r1.setImageResource(r.getRelationImage(game.getCat1()));
} catch (Exception e) {
r1.setImageResource(R.drawable.icon);
@@ -192,7 +192,7 @@ public class BaseGame extends Activity implements OnClickListener {
// TODO : A enlever lorsque l'on aura toutes les images des relations.
try {
r2.setOnClickListener(this);
- rn2.setText(r.getRelationName(game.getCat2()));
+ rn2.setText(String.format(r.getRelationName(game.getCat2()), ((TextView)findViewById(R.id.mainWord)).getText()));
r2.setImageResource(r.getRelationImage(game.getCat2()));
} catch (Exception e) {
r2.setImageResource(R.drawable.icon);
@@ -208,7 +208,7 @@ public class BaseGame extends Activity implements OnClickListener {
// TODO : A enlever lorsque l'on aura toutes les images des relations.
try {
r4.setOnClickListener(this);
- rn4.setText(r.getRelationName(game.getCat4()));
+ rn4.setText(String.format(r.getRelationName(game.getCat4()), ((TextView)findViewById(R.id.mainWord)).getText()));
r4.setImageResource(r.getRelationImage(game.getCat4()));
} catch (Exception e) {
r4.setImageResource(R.drawable.icon);
diff --git a/code/PtiClic/src/org/pticlic/model/Relation.java b/code/PtiClic/src/org/pticlic/model/Relation.java
@@ -29,7 +29,7 @@ public class Relation {
// ATTENTION ! Tout ce qui est ci-dessous est en double dans relations.php .
stringRelations = new HashMap<Integer, String>();
- stringRelations.put(-1, "Mot non lié au mot central");
+ stringRelations.put(-1, "Mot non lié à '%s'");
stringRelations.put(0, "'%s' est en rapport avec...");
stringRelations.put(1, "raffinement sémantique");
stringRelations.put(2, "raffinement morphologique");