wri / gfw-mapbuilder

Template for the GFW Map Builder that is available through ArcGIS Online, as a stand-alone web application, & a library to build custom Forest Atlas web applications
https://my.gfw-mapbuilder.org/v1.latest/
MIT License
32 stars 10 forks source link

Add translations for parts of app #457

Closed csphang closed 4 years ago

csphang commented 5 years ago

Word doc with translations coming soon

richardbarad commented 5 years ago

@csphang. I have attached word documents with the translations.

Note that some of the translations are handled through the API, widgets, layer configurations, and analysis module so this information should all already be translated.

I believe the components which need to be translated on your side are:

These sections are located at the bottom of the translation documents. Let me know if you have any questions or need additional information!

Spanish: Translations_ES-LA_AM.docx

Indonesian: Translations_ID-IC.docx

Georgian: Translations_KA_KN.docx

Portuguese: Translations_PT-BR_MM.docx

Chinese:Translations_ZH-CN_bl.docx

French: Translations_FR.docx

KaylaKremer commented 5 years ago

@richardbarad ,

I've encountered a few things that haven't been translated.

For the subscription tools:

For the imagery module:

I also noticed Indonesian lacks the translations for the full month names

This is for all languages!

KaylaKremer commented 5 years ago

@richardbarad Here's a build with the translations updated: http://alpha.blueraster.io/gfw-mapbuilder/457-add-translations/

I noticed that in addition to the points mentioned above, there's also other text that hasn't been translated and I wasn't able to find in the document (I didn't check everything listed below, but a lot of it I couldn't find). I copied the text for Chinese as an example so you can see what we still have in English:

//- NOTE: Mandarin
//- Supported Languages
strings.zh.LANG_EN = 'English';
strings.zh.LANG_FR = 'French';
strings.zh.LANG_ES = 'Spanish';
strings.zh.LANG_PT = 'Portugese';
strings.zh.LANG_ID = 'Indonesian';
strings.zh.LANG_ZH = 'Mandarin';
strings.zh.LANG_KA = 'Georgian';

//- Header
strings.zh.NAV_ABOUT = '关于';
strings.zh.NAV_DOWNLOAD = '下载数据';
strings.zh.NAV_MAP_THEMES = '地图图集';
strings.zh.NAV_MY_GFW_LOGIN = '登录我的GFW';
strings.zh.NAV_MY_GFW = 'GFW';
strings.zh.NAV_LOGIN_REQUIRED = '您需要登录以查看、管理或删除您的订阅。 有疑问? ';
strings.zh.NAV_CONTACT_US = '请联系我们';
strings.zh.NAV_TWITTER = '使用 Twitter 账户登录';
strings.zh.NAV_FACEBOOK = 'Log in with Facebook'; //TODO: Get this from GFW!
strings.zh.NAV_GOOGLE = '使用谷歌账户登录';
strings.zh.NAV_SUBSCRIPTIONS = '我的订阅';
strings.zh.NAV_STORIES = '我的故事';
strings.zh.NAV_PROFILE = '我的概述';
strings.zh.NAV_LOGOUT = '注销';
strings.zh.NAV_LANGUAGE = '选择语言';

//- Subscription
strings.zh.SUBSCRIBE_SAVED_TITLE = 'Subscription saved!';
strings.zh.SUBSCRIBE_SAVED_DESC = 'This subscription has been added to your profile. ';
strings.zh.SUBSCRIBE_SAVED_DESC_STRONG = 'Please check your email and click on the link to confirm your subscription.';
strings.zh.SUBSCRIBE_SAVED_DESC_END = 'Visit your';
strings.zh.SUBSCRIBE_SAVED_LINK = 'saved subscriptions';
strings.zh.SUBSCRIBE_SAVED_END = ' to manage them.';
strings.zh.SUBSCRIBE_ALERTS_TITLE = '森林变化预警';
strings.zh.SUBSCRIBE_ALERTS_SELECT = 'Select the forest change alerts you would like to receive';
strings.zh.SUBSCRIBE_ALERTS_VIIRS = 'VIIRS 活跃火点预警';
strings.zh.SUBSCRIBE_ALERTS_TCL = 'Tree cover loss data';
strings.zh.SUBSCRIBE_ALERTS_GLAD = 'GLAD 森林覆盖减少预警';
strings.zh.SUBSCRIBE_ALERTS_FORMA = 'FORMA 预警数据';
strings.zh.SUBSCRIBE_ALERTS_PRODES = 'PRODES 毁林数据';
strings.zh.SUBSCRIBE_ALERTS_SAD = 'SAD 森林覆盖减少预警';
strings.zh.SUBSCRIBE_ALERTS_TERRA = 'Terra-i 森林覆盖减少预警';
strings.zh.SUBSCRIBE_EMAIL_TITLE = '订阅预警';
strings.zh.SUBSCRIBE_EMAIL = '在下方输入您的电子邮箱,您将在此区域有新的年度森林覆盖减少数据时收到电子邮件通知。';
strings.zh.SUBSCRIBE_EMAIL_ALERTS = '接收预警电子邮件频率';
strings.zh.SUBSCRIBE_NAME_SUBSCRIPTION = '为您的订阅命名';
strings.zh.SUBSCRIBE_DELETE_TITLE = 'Delete this subscription';
strings.zh.SUBSCRIBE_DELETE_DESC = 'This will delete the subscription from your profile. Are you sure?';
strings.zh.SUBSCRIBE_DELETE_CONFIRM = 'Delete';
strings.zh.SUBSCRIBE_DELETE_CANCEL = 'Cancel';
strings.zh.SUBSCRIBE_BACK = '后退';
strings.zh.SUBSCRIBE_NEXT = 'Next';
strings.zh.SUBSCRIBE_SAVE = '保存';
strings.zh.SUBSCRIBE_OK = 'OK';
strings.zh.SUBSCRIBE_NAME = '姓名';
strings.zh.SUBSCRIBE_AREA = '区域名称';
strings.zh.SUBSCRIBE_ERROR = 'You must have an alert subscription, valid email, and area name!';

//- Documents
strings.zh.DOCS_INSTRUCTIONS = '选择感兴趣区域来查看相关文件';
strings.zh.DOCS_NOT_AVAILABLE = '此区域没有相关文件';
strings.zh.DOCS_TYPE = '类别';
strings.zh.DOCS_AUTHOR = '作者';
strings.zh.DOCS_YEAR = '年份';
strings.zh.DOCS_PDF = 'PDF';
strings.zh.DOCS_NAME = '姓名';
strings.zh.DOCS_SIZE = 'Size';
//- Info Window
strings.zh.INFO_WINDOW_INSTRUCTION_HEADER = '在地图上选择图形';
strings.zh.INFO_WINDOW_INSTRUCTION_LIST = [
  '使用图层键来打开图层',
  '在地图上选择图形'
];
//- Analysis
strings.zh.ANALYSIS_NOT_SELECTED = [
  '未选择分析。',
  '从下拉菜单中选择一项分析以开始'
];
strings.zh.ANALYSIS_SELECTED = [
  '选择分析日期',
  '选择分析范围',
  '选择森林覆盖密度'
];
strings.zh.ANALYSIS_INSTRUCTION_HEADER = '分析地图上的图形';
strings.zh.ANALYSIS_INSTRUCTION_LIST = [
  '使用图层键来打开图层',
  '在地图上选择一个图形',
  '点击分析键'
];
strings.zh.ANALYSIS_TOOLTIP = '您选择的几何形状正在 GeoStore 注册。分析选项卡即刻可用';
strings.zh.ANALYSIS_OR = '或者';
strings.zh.ANALYSIS_DRAW_HEADER = '分析自定义图形';
//- ${drawIcon} references a variable above, do not translate
strings.zh.ANALYSIS_DRAW_INSTRUCTIONS = [
  `在工具箱里选择一个绘画工具 ${drawIcon}`,
  '在地图上任意地方画一个图形',
  '选择进行分析的图形'
];
strings.zh.ANALYSIS_DRAW_BUTTON = '开始绘画';
strings.zh.ANALYSIS_INSTRUCTION_ADDITIONAL = `使用绘画工具来添加更多图形 ${drawIcon}`;
strings.zh.ANALYSIS_SHAPEFILE_UPLOAD = '或者在这里添加自定义地理信息系统文件(shapefile)';
strings.zh.ANALYSIS_SHAPEFILE_INSTRUCTIONS = '本网站仅支持空间参考系统为WGS84的图形数据文件。建议文件大小应小于5MB。ESRI文件必须为压缩文件(.zip),GeoJSON 文件必须为后缀.json的文件。';
strings.zh.ANALYSIS_SELECT_TYPE_LABEL = '选择分析方式:';
//- Chart Labels in the Analysis
strings.zh.ANALYSIS_TC_CHART_NAME = '森林覆盖损失(单位:公顷)';
strings.zh.ANALYSIS_LCC_CHART_NAME = '土地覆盖组成';
strings.zh.ANALYSIS_IFL_LABELS = ['原生森林'];
strings.zh.ANALYSIS_MANGROVE_LABELS = ['Global Mangroves'];
strings.zh.ANALYSIS_FIRES_PRE = '共计';
strings.zh.ANALYSIS_FIRES_ACTIVE = '活跃火点';
strings.zh.ANALYSIS_FIRES_POST_LIST = [
  'in the last 7 days',
  'in the last 72 hours',
  'in the last 48 hours',
  'in the last 24 hours'
];
strings.zh.ANALYSIS_TOTAL_LOSS_LABEL = '总森林覆盖损失';
strings.zh.ANALYSIS_TOTAL_LOSS_RANGE = '(2001 - 2015):';
strings.zh.ANALYSIS_TOTAL_GAIN_LABEL = '总森林覆盖增加';
strings.zh.ANALYSIS_TOTAL_GAIN_RANGE = '(2001 - 2012):';
strings.zh.ANALYSIS_SLOPE_OPTION = '选项 #';
strings.zh.SLOPE_SELECT_LABEL = '选择倾斜度:';
strings.zh.ANALYSIS_RESTORATION_ERROR = '无数据 或者 区域不满足条件';
strings.zh.ANALYSIS_GROUP_RESTORATION = '在生态修复可能性的层面';
strings.zh.ANALYSIS_GROUP_SLOPE = '可能性原因';
strings.zh.ANALYSIS_GROUP_OTHER = '其他分析';
strings.zh.ANALYSIS_GLAD_ALERT_NAME = 'GLAD Alerts';
strings.zh.ANALYSIS_TERRA_I_ALERT_NAME = 'Terra-I Alerts';
strings.zh.ANALYSIS_SAD_ALERT_NAMES = {
  degrad: 'Degradation',
  defor: 'Deforestation'
};

strings.zh.DEFAULT_ANALYSIS_LABEL = 'Select analysis...';
strings.zh.RUN_ANALYSIS_BUTTON_TEXT = 'Run Analysis';
strings.zh.ANALYSIS_ERROR = '执行所选分析时出现错误。请选择一个更小的区域、其他分析或稍后重试。';
strings.zh.RUN_ANALYSIS_INSTRUCTIONS = '点击“运行分析”按钮查看结果';
strings.zh.ANALYSIS_NO_DATA = '无可用数据';

//- Group and value should not be modified
strings.zh.ANALYSIS_SELECT_TYPE_OPTIONS = [
  {
    label: 'Select analysis...',
    value: 'default',
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '倾斜度',
    value: analysisKeys.SLOPE,
    group: analysisKeys.ANALYSIS_GROUP_SLOPE
  },
  { label: '总森林覆盖损失或增加',
    value: analysisKeys.TC_LOSS_GAIN,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '森林覆盖损失',
    value: analysisKeys.TC_LOSS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '土地覆盖损失',
    value: analysisKeys.LC_LOSS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '地上活性木质生物量损失',
    value: analysisKeys.BIO_LOSS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '原生林损失',
    value: analysisKeys.INTACT_LOSS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'Global mangrove loss',
    value: analysisKeys.MANGROVE_LOSS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'SAD alerts',
    value: analysisKeys.SAD_ALERTS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'GLAD alerts',
    value: analysisKeys.GLAD_ALERTS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'Terra-I alerts',
    value: analysisKeys.TERRA_I_ALERTS,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'VIIRS fires',
    value: analysisKeys.VIIRS_FIRES,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: 'MODIS fires',
    value: analysisKeys.MODIS_FIRES,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  },
  { label: '土地覆盖组成',
    value: analysisKeys.LCC,
    group: analysisKeys.ANALYSIS_GROUP_OTHER
  }
];

//- Modals
strings.zh.CANOPY_MODAL_TEXT = '对森林覆盖和森林覆盖损失图层调试最低林冠覆盖密度';
strings.zh.DENSITY_FIRST = '显示中';
strings.zh.DENSITY_SECOND = '林冠覆盖密度';
strings.zh.SEARCH_WIDGET_TITLE = '搜寻特征:';
strings.zh.SEARCH_CLICK_FOR_MORE = '请点击选中图形来获取更多信息';

//- Imagery Modal
strings.zh.IMAGERY = [
  '近期图像',
  '近期高分辨率卫星图像'
];
strings.zh.ACQUISITION = '采集日期';
strings.zh.DATE = '日期';
strings.zh.NATURAL_COLOR = '自然色';
strings.zh.VEGETATION = '植被健康状况';
strings.zh.INSTRUMENT = '工具';
strings.zh.CLOUD = '云层覆盖';
strings.zh.MONTHS = '月份';
strings.zh.WEEKS = '周';
strings.zh.CLOUD_PERCENTAGE = '最大云层覆盖百分比';
strings.zh.EDIT = '编辑';
strings.zh.BEFORE = '之前';
strings.zh.LOAD_ERROR = 'Error loading recent imagery.';
strings.zh.MATCH_ERROR = 'No results match the selected criteria.';

//- Layer Info Modal
strings.zh.NO_INFO = '没有相关信息';
strings.zh.OVERVIEW = '概述';
strings.zh.CITATION = '引用';
//- Case does not matter, css makes them all uppercase
strings.zh.FUNCTION = '功能';
strings.zh.RESOLUTION = '清晰度';
strings.zh.GEO_COVERAGE = '空间覆盖范围';
strings.zh.SOURCE = '来源';
strings.zh.FREQUENCY = '更新频率';
strings.zh.CONTENT_DATE = '内容日期';
strings.zh.CAUTIONS = '注意';
strings.zh.LICENSE = '数据分享执照';
strings.zh.LEARN_MORE = '了解更多';
strings.zh.DOWNLOAD_DATA = '下载数据';
strings.zh.DESCRIPTION = '说明';

//Measurement
strings.zh.MEASUREMENT = '测量';
strings.zh.RESULT = '结果';
strings.zh.AREA = '区域';
strings.zh.DISTANCE = '距离';
strings.zh.LOCATION = '位置';
strings.zh.LATITUDE = '纬度';
strings.zh.LONGITUDE = '经度';

//- Miscellaneous
strings.zh.PRINT_BUTTON_LABEL = '选择打印模板';
strings.zh.PRINT_REPORT = '打印报告';
strings.zh.EDIT_SAVE = '保存';
strings.zh.EDIT_EDIT = '编辑';
strings.zh.SUBSCRIBE = '订阅';
strings.zh.SEARCH = '搜寻';
strings.zh.LAYERS = '图层';
strings.zh.DATA = '数据';
strings.zh.ANALYZE = '分析';
strings.zh.DOCS = '文本文件';
strings.zh.NARRATIVE = '说明';
strings.zh.MORE = '更多';
strings.zh.DELETE = '删除';
strings.zh.DOCUMENTS = '文件';

strings.zh.BASEMAP = '底图';
strings.zh.SELECT_ALL = '全选';
strings.zh.CLEAR_ALL = '全部清除';
strings.zh.LEGEND = '图例';
strings.zh.TIMELINE = '时间范围';
strings.zh.TIMELINE_START = '开始:';
strings.zh.TIMELINE_END = '结束:';
strings.zh.SEARCH = '搜索'; // Also Used for tools, but was used else where first
strings.zh.TOOL_ZOOM_IN = '放大';
strings.zh.TOOL_ZOOM_OUT = '缩小';
strings.zh.TOOL_SHARE = '分享';
strings.zh.TOOL_PRINT = '打印';
strings.zh.TOOL_ANALYSIS = '分析';
strings.zh.TOOL_TOGGLE = '控制面板';
strings.zh.TOOL_RESET = '重置';

strings.zh.ANALYSIS_CARBON_EMISSION = 'Gross carbon emissions';
strings.zh.ANALYSIS_CARBON_LOSS = 'Tree cover loss';
strings.zh.ANALYSIS_SLOPE_CHART_HEADER = 'Slope';
strings.zh.ANALYSIS_LAND_COVER_CHART_HEADER = 'Land Cover';
strings.zh.ANALYSIS_POPULATION_CHART_HEADER = 'Population Density';
strings.zh.ANALYSIS_TREE_COVER_CHART_HEADER = '% Tree cover';
strings.zh.ANALYSIS_RAINFALL_CHART_HEADER = 'Rainfall';
strings.zh.MONTHS_LIST = [
  { name: '一月', abbr: '一月'},
  { name: '二月', abbr: '二月'},
  { name: '三月', abbr: '三月'},
  { name: '四月', abbr: '四月'},
  { name: '五月', abbr: '五月'},
  { name: '六月', abbr: '六月'},
  { name: '七月', abbr: '七月'},
  { name: '八月', abbr: '八月'},
  { name: '九月', abbr: '九月'},
  { name: '十月', abbr: '十月'},
  { name: '十一月', abbr: '十一月'},
  { name: '十二月', abbr: '十二月'}
];

strings.zh.REPORT_TABLE_TOTAL = 'Total';
strings.zh.REPORT_SLOPE_TITLE = 'Slope Analysis';
strings.zh.REPORT_SLOPE_TABLE_TYPE = 'Slope Potential Type';
strings.zh.REPORT_SLOPE_TABLE_VALUE = 'Hectares';
strings.zh.REPORT_RESTORATION_TABLE_TYPE = 'Category';
strings.zh.REPORT_RESTORATION_TABLE_VALUE = 'Hectares';

//- Error Messages
strings.zh.ANALYSIS_ERROR_TC_LOSS_GAIN = 'An error occurred while fetching tree cover loss/gain analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_TC_LOSS = 'An error occurred while fetching tree cover loss analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_LAND_COVER_LOSS = 'An error occurred while fetching land cover loss analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_LAND_COVER_COMPOSITION = 'An error occurred while fetching land cover composition analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_INTACT_LOSS = 'An error occurred while fetching intact loss analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_SAD = 'An error occurred while fetching SAD analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_GLAD = 'An error occurred while fetching GLAD analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_SLOPE = 'An error occurred while fetching slope analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_TERRA_I = 'An error occurred while fetching TERRA I analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_BIO_LOSS = 'An error occurred while fetching biomass loss analysis. Please select another analysis.';
strings.zh.ANALYSIS_ERROR_FIRE_COUNT = 'An error occurred while fetching fire count analysis. Please select another analysis.';

If everything needs to be translated, would it be possible to get a Word doc with just the text that still needs to be translated for each language?

richardbarad commented 4 years ago

@KaylaKremer. The text which was translated was based on a file provided by @csphang and Jennifer, but maybe we overlooked some components of the app which still need translating. I'll go through the code latter and find what still needs translating and send it out for translation. Where is the .js file where the translations are managed?

In the meantime, here are some translations for the drawing coordinates feature! Note that I am still missing Spanish but hope to have that soon.

Draw-Coordinates_ID.docx Draw-Coordinates_KA.docx Draw-Coordinates_PT.docx Draw-Coordinates_ZH.docx Draw-Coordinates_FR.docx

Best,

Richard

KaylaKremer commented 4 years ago

@richardbarad

Thanks for the drawing coordinates translations!

And the translations are handled in languages.js as well as in our resources.js file for a few labels/titles.

KaylaKremer commented 4 years ago

@richardbarad

I've gone ahead and updated the translations with the files you provided for the coordinates. Thanks for putting the words in order btw, it made it a lot easier to copy and paste over!

One note, the only thing that was missing from the translated coordinate section was Coordinate Values

To make things better organized, I'm attaching the updated languages.js and resources.js file. It should be easy to tell what's still missing a translation with these!

javascript files.zip

richardbarad commented 4 years ago

@KaylaKremer. Thanks! I will go through these next week and find the text which needs translations.

richardbarad commented 4 years ago

@KaylaKremer. This is approved, and we can merge in the translations we have. I'll review the language.js at a future phase and make sure everything get translated in the next batch of translations we send out.

richardbarad commented 4 years ago

@KaylaKremer. I just received translations for the draw coordinates tool in Spanish, which was the last language we needed translations for. Would you be able to add these as part of this phase?

Draw-Coordinates_SP.docx

KaylaKremer commented 4 years ago

@richardbarad , sure I can add them!

richardbarad commented 4 years ago

Thanks! Looks good!