datafaker icon indicating copy to clipboard operation
datafaker copied to clipboard

A bug in the job method

Open Gandhi-gd opened this issue 3 years ago • 4 comments

Describe the bug The bug about Chinese still exists, just like the https://github.com/DiUS/java-faker/ library To Reproduce

import net.datafaker.Faker;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Locale;

@SpringBootTest
class SpringBootStudyApplicationTests {

    @Test
    void testFaker() {
        Faker faker = new Faker(Locale.CHINA);
        System.out.println(faker.name().name());
        System.out.println(faker.job().field());
        System.out.println(faker.job().position());
        System.out.println(faker.job().title());
    }
}

result image

Versions:

  • OS: windows
  • JDK 8
  • Faker 1.6.0

Gandhi-gd avatar Sep 19 '22 02:09 Gandhi-gd

Sorry, but what is the bug exactly? What did expect to see instead?

bodiam avatar Sep 19 '22 03:09 bodiam

Sorry, but what is the bug exactly? What did expect to see instead?

I have set Chinese, so it should be that all the output is Chinese like the name method

Gandhi-gd avatar Sep 19 '22 03:09 Gandhi-gd

There is unfortunately no translated job information in the zh-CN.yml file. The only translations we have is in hy.yml, pt-BR.yml`, and the default English.

We'd absolutely love contributions in this. My understanding of the Chinese language is poor, but If you'd be willing to help translate this data, or a subset of it, we'd be very happy to include it in the library.

These are the fields which need translating:

    job:
      field: [Marketing, IT, Accounting, Administration, Advertising, Banking, Community-Services, Construction, Consulting, Design, Education, Farming, Government, Healthcare, Hospitality, Legal, Manufacturing, Marketing, Mining, Real-Estate, Retail, Sales, Technology]
      seniority: [Lead, Senior, Product, National, Regional, District, Central, Global, Customer, Investor, Dynamic, International, Legacy, Forward, Internal, Chief, Direct, Corporate, Future, Human, Principal]
      position: [Supervisor, Associate, Executive, Liaison, Officer, Manager, Engineer, Specialist, Director, Coordinator, Administrator, Architect, Analyst, Designer, Planner, Orchestrator, Technician, Developer, Producer, Consultant, Assistant, Facilitator, Agent, Representative, Strategist]
      key_skills: [Teamwork, Communication, Problem solving, Leadership, Organisation, Work under pressure, Confidence, Self-motivated, Networking skills, Proactive, Fast learner, Technical savvy]
      employment_type: [Full-time, Part-time, Temporary, Contract, Internship, Commission]
      education_level: [Associates, Bachelor, Master, Doctorate]

maybe this would be a starting point:

    job:
      field: [市场营销、IT、会计、行政管理、广告、银行、社区服务、施工、咨询、设计、教育、农业、政府、医疗保健、酒店业、法律、制造、市场营销、采矿、房地产、零售、销售、技术]
      seniority: [铅, 高级, 产品, 国家, 区域, 区, 中央, 全球, 客户, 投资者, 动态, 国际, 遗产, 转发, 内部, 行政长官, 直接, 企业, 未来, 人类, 委托人]
      position: [主管、助理、行政人员、联络员、主任、经理、工程师、专家、主任、协调员、管理员、建筑师、分析师、设计师、规划师、协调员、技术员、开发人员、生产者、顾问、助理、促进者、代理、代表、战略家]
      key_skills: [团队合作、沟通、解决问题、领导力、组织、在压力下工作、自信、自我激励、网络技能、积极主动、快速学习者、精通技术]
      employment_type: [全职、兼职、临时、合同、实习、佣金]
      education_level: [副学士、学士、硕士、博士]

If you could review the above (I've used Google translate to translate the items), then I'm happy to add it to the library.

PS: even if this would be fixed, there would be lots of other translations which are missing. We're depending a little bit on the contributions of others to fix this, I'm afraid, so as mentioned before, any help in this would be appreciated, and the Chinese language is definitely underrepresented in our dataset.

bodiam avatar Sep 19 '22 03:09 bodiam

My English is not good either, but I think I should be able to find translations that are obviously wrong.

Let me first check the existing fields you mentioned.

Gandhi-gd avatar Sep 19 '22 04:09 Gandhi-gd

@Gandhi-gd any chance to look at the above?

bodiam avatar Sep 25 '22 07:09 bodiam

I'll close this one for now. Please let me know if this is still an issue and if you want to have it fixed.

bodiam avatar Sep 29 '22 11:09 bodiam