xitanggg / open-resume

OpenResume is a powerful open-source resume builder and resume parser. https://open-resume.com/

Home Page:https://open-resume.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make it compatible with Chinese

brian95827 opened this issue · comments

How to make it compatible with Chinese?How to decode pdf using utf8

commented

I create a pr for this, please take a look and give some advice.

commented

我也部署了个中文版的 open-resume ,不过只支持创建,那个解析算法好像支持英文简历。

commented

我也部署了个中文版的 open-resume ,不过只支持创建,那个解析算法好像支持英文简历。

您这边用的是什么字体呀,我试了试换行有问题

commented

有空我看下😂

commented

有空我看下joy

不不,我是说我的有问题,你这边没有

👋 Thanks for creating this issue and a PR. OpenResume is initially developed specifically for the US job market, so it hasn't supported other countries with non-English languages. It wouldn't be too difficult to add other languages support for the builder, but before we add it, can I get your thoughts on 2 questions:

  1. Do you think OpenResume's resume template is a good resume template for the Chinese job market? While I know it works well in the US job market, I am not sure about other countries and if it would require additional twists/features other than language support?
  2. Can you console log navigator.language and navigator.languages and share the results with me? The current PR would roll out the language to all users, which might not be ideal. One idea that comes to mind is to only show the language to user if it matches their locale to create a more personalized experience.

(Getting the parser to work with other languages is possible, but would be quite involved and require quite a bit of refactoring. Also, I am not sure if other countries use ATS.)


👋 谢谢你们开了个issue跟PR. OpenResume一开始是按照美国的求职市场建立的,所以并不支持其他语言. 给builder增加支持其他语言并不难,就几行代码. 但是在我们加之前,我有2个问题你们能回答下吗:

  1. 你们觉得OpenResume的简历模版适应国内求职市场的环境吗? 我知道这个模版在美国是可行的, 但是不太确定国内或者其他国家的要求. 如果只是在builder上加个语言支持还是比较简单的. 但是如果有其他的要求就会比较复杂
  2. 你们能在浏览器console跑下navigator.languagenavigator.languages, 并把结果发过来看看吗? 现在的PR把方正字体呈现给所有用户了,这样UX并不是很理想. 我在想能不能通过navigator.language识别出用户的语言, 然后只给有对应语言的用户呈现出来对应的语言选项.

(另外parser是只支持英文简历的. 调整支持其他语言是可以的, 但是改动会比较大. 而且我不太确定国内或者其他国家是否用ATS. 如果不用的话, 更改支持可能意义不大)

这个中文版的open-resume太酷拉, 哈哈哈, 中文是怎么翻译的啊

commented

有空我看下joy

不不,我是说我的有问题,你这边没有

字体是使用的 思源字体,从 免费中文字体 这个项目中找的可嵌入PDF文件的字体。

commented

👋 Thanks for creating this issue and a PR. OpenResume is initially developed specifically for the US job market, so it hasn't supported other countries with non-English languages. It wouldn't be too difficult to add other languages support for the builder, but before we add it, can I get your thoughts on 2 questions:

  1. Do you think OpenResume's resume template is a good resume template for the Chinese job market? While I know it works well in the US job market, I am not sure about other countries and if it would require additional twists/features other than language support?
  2. Can you console log navigator.language and navigator.languages and share the results with me? The current PR would roll out the language to all users, which might not be ideal. One idea that comes to mind is to only show the language to user if it matches their locale to create a more personalized experience.

(Getting the parser to work with other languages is possible, but would be quite involved and require quite a bit of refactoring. Also, I am not sure if other countries use ATS.)

👋 谢谢你们开了个issue跟PR. OpenResume一开始是按照美国的求职市场建立的,所以并不支持其他语言. 给builder增加支持其他语言并不难,就几行代码. 但是在我们加之前,我有2个问题你们能回答下吗:

  1. 你们觉得OpenResume的简历模版适应国内求职市场的环境吗? 我知道这个模版在美国是可行的, 但是不太确定国内或者其他国家的要求. 如果只是在builder上加个语言支持还是比较简单的. 但是如果有其他的要求就会比较复杂
  2. 你们能在浏览器console跑下navigator.languagenavigator.languages, 并把结果发过来看看吗? 现在的PR把方正字体呈现给所有用户了,这样UX并不是很理想. 我在想能不能通过navigator.language识别出用户的语言, 然后只给有对应语言的用户呈现出来对应的语言选项.

(另外parser是只支持英文简历的. 调整支持其他语言是可以的, 但是改动会比较大. 而且我不太确定国内或者其他国家是否用ATS. 如果不用的话, 更改支持可能意义不大)

这个中文版的open-resume太酷拉, 哈哈哈, 中文是怎么翻译的啊

使用 chatgpt 翻译的,我就是考虑到你说的这几点,所以没有提PR。

commented

I took a look, and if fully supporting Chinese requires quite a lot of changes, I'm going to close the PR for now.(我看了一下,如果需要完善的支持中文,改动确实比较多,pr我先关掉了)

@yandif 中文版open-resume有两个小bug:1. 文件尺寸不能切换为A4纸尺寸,原本的open-resume是可以的;2. Description中的长文本在预览中显示正常,但下载后不会换行。

I took a look, and if fully supporting Chinese requires quite a lot of changes, I'm going to close the PR for now.(我看了一下,如果需要完善的支持中文,改动确实比较多,pr我先关掉了)

抱歉晚了回复,过去几周有点忙。Builder支持中文还是比较简单的,我只是不确定这个简历模版在国内适用不。要是适用,加个中文支持还是比较简单的。你们有国内比较好的简历模版能发过来看看对比一下吗?

我刚刚在Github搜了搜国内的简历模版,找到这个repo https://github.com/dyweb/awesome-resume-for-chinese。 OpenResume的简历模版跟这些看来好像相差不大。我今天和这周有点时间,我重开了你的PR,我看看能不能做些改动支持中文

--- Below is the backfilled English translation for others who might be interested in following the conversation
Sorry for the delay in response, my schedule was a bit hectic for the past few weeks. Supporting Chinese language for the Resume Builder wouldn't be too difficult. My only concern was whether this resume template is suitable in the Chinese job market. If it is suitable, I'd be happy to add Chinese language support. Do you have any resume template that works well in the Chinese job market that you can share so I can take look?

I just did a quick search on Github and came across this repo https://github.com/dyweb/awesome-resume-for-chinese. It seems some of these Chinese resume templates are similar to OpenResume's template, so OpenResume's template might work well in China? I have some time today and this week. I just re-open your PR and I will see if I can make some additions to support Chinese

今天看了下,刚刚push了下列的changes进去你的PR #40

  1. 当用户 navigator.languageszh语言, 用户能看到思源黑体 (简体)的字体选项
  2. 另外修复了3个小问题
    -问题A: 修复了生成出来的PDF字体复制粘贴错误字体的问题 (我在 src/app/components/fonts/constants.ts 上note了这个问题, 就是原生的字体一般都要重新re-export才能复制正确.)

One major problem with adding a new font family is that most font family doesn't work with
React PDF out of box. The texts would appear fine in the PDF, but copying and pasting them
would result in different texts. See issues: diegomura/react-pdf#915
and diegomura/react-pdf#629

A solution to this problem is to import and re-export the font with a font editor, e.g. fontforge or birdfont.

If using fontforge, the following command can be used to export the font:
./fontforge -lang=ff -c 'Open($1); Generate($2); Close();' old_font.ttf new_font.ttf
Note that fontforge doesn't work on non-english fonts: fontforge/fontforge#1534
Also, some fonts might still not work after re-export.

(现在思源黑体 (简体)用birdfont重新export后Regular25MB, Bold也25MB🤦我本来还想加多几个字体, 例如繁体字啥的, 现在暂时还是算了, 要不传送bandwidth太厉害, 以后可能得找个CDN host这些re-export的字体才能再增加多点其他选项)

-问题B: 修复了非英文字体不会换行的问题
-问题C: 修复了A4纸尺寸的问题

我还没测试仔细测试下, 要是有人有时间能帮忙测测新的changes看看有没问题吗: https://open-resume-qp0x3lun5-xitang.vercel.app/resume-builder, 没问题我再merge, 谢啦

Recording 2023-08-01 at 1 35 27 AM

--- Below is the backfilled English translation for others who might be interested in following the conversation
I just got a chance to take a look today and pushed up the following changes to your PR #40

  1. If user has zh language in their browser's navigator.languages property, user would see 思源黑体 (简体)/Noto Sans Simplified Chinese as one of the font option in the font family section
  2. Three small issues are now fixed
  • Issue a: fix Noto Sans Simplified Chinese font copying & pasting issue in the generated pdf. I had added some comments in src/app/components/fonts/constants.ts to document this issue, as listed/quoted below. Basically, google fonts need to re-export to be able to copy and paste correctly.

One major problem with adding a new font family is that most font family doesn't work with
React PDF out of box. The texts would appear fine in the PDF, but copying and pasting them
would result in different texts. See issues: diegomura/react-pdf#915
and diegomura/react-pdf#629

A solution to this problem is to import and re-export the font with a font editor, e.g. fontforge or birdfont.

If using fontforge, the following command can be used to export the font:
./fontforge -lang=ff -c 'Open($1); Generate($2); Close();' old_font.ttf new_font.ttf
Note that fontforge doesn't work on non-english fonts: fontforge/fontforge#1534
Also, some fonts might still not work after re-export.

(As a side note, after re-exporting Noto Sans Simplified Chinese with birdfont, its Regular font size is 25MB, which is quite large, not to mention Bold also adds another 25MB🤦I initially had thought about adding a couple more fonts, e.g. Traditional Chinese, etc, but I would leave it for now. Otherwise, it would blow up the bandwidth. I would need to explore better options to host these large fonts before adding more font options)

-Issue B: Fix non-english font line break issue in react pdf
-Issue C: Fix a bug with A4 iframe size

刚刚测试了下,新加的思源黑体 (简体)没什么问题, 我把PR merge 到 main了.

当浏览器navigator.languageszh语言, 用户就能看到思源黑体 (简体)的选项. 谢啦. Closing this issue now

commented

辛苦辛苦,最近没来的及看