textArgs support map again
This commit is contained in:
@ -12,7 +12,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractLanguageMapper implements LanguageMapping {
|
public abstract class AbstractLanguageMapper implements LanguageMapping {
|
||||||
|
|
||||||
protected static final StringInterpolator INTERPOLATOR = StringInterpolator.createDollarInterpolator();
|
protected final StringInterpolator INTERPOLATOR = StringInterpolator.createDollarInterpolator();
|
||||||
|
|
||||||
protected final Language language;
|
protected final Language language;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.imyeyu.lang.mapper;
|
package com.imyeyu.lang.mapper;
|
||||||
|
|
||||||
import com.imyeyu.java.TimiJava;
|
import com.imyeyu.java.TimiJava;
|
||||||
|
import com.imyeyu.java.bean.CallbackArgReturn;
|
||||||
import com.imyeyu.java.bean.Language;
|
import com.imyeyu.java.bean.Language;
|
||||||
import com.imyeyu.utils.Text;
|
import com.imyeyu.utils.Text;
|
||||||
|
|
||||||
@ -16,6 +17,15 @@ public class LanguageMap extends AbstractLanguageMapper {
|
|||||||
|
|
||||||
protected final Map<String, String> map;
|
protected final Map<String, String> map;
|
||||||
|
|
||||||
|
{
|
||||||
|
INTERPOLATOR.putFilter("lang", value -> {
|
||||||
|
if (value.startsWith("@")) {
|
||||||
|
value = text(value.substring(1));
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认构造
|
* 默认构造
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user