Пример #1
0
        public override void Execute()
        {
            #line 10 "..\..\Translation\Views\View.cshtml"

            CultureInfo culture        = ViewBag.Culture;
            CultureInfo defaultCulture = ViewBag.DefaultCulture;
            Assembly    assembly       = ViewBag.Assembly;

            ViewBag.Title = TranslationMessage.View0In1.NiceToString().FormatWith(assembly.GetName().Name, culture == null ? TranslationMessage.AllLanguages.NiceToString() : culture.DisplayName);

            Func <CultureInfo, bool> editCulture = c => culture == null || culture.Name == c.Name;

            Func <LocalizedType, string> locKey = lt => lt.Type.Name + "." + lt.Assembly.Culture.Name;


            #line default
            #line hidden
            WriteLiteral("\r\n");


            #line 21 "..\..\Translation\Views\View.cshtml"
            Write(Html.ScriptCss("~/Translation/Content/Translation.css"));


            #line default
            #line hidden
            WriteLiteral("\r\n\r\n<h2>");


            #line 23 "..\..\Translation\Views\View.cshtml"
            Write(ViewBag.Title);


            #line default
            #line hidden
            WriteLiteral("</h2>\r\n\r\n<div>\r\n");


            #line 26 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 26 "..\..\Translation\Views\View.cshtml"
            using (Html.BeginForm("View", "Translation", FormMethod.Get))
            {
            #line default
            #line hidden

            #line 28 "..\..\Translation\Views\View.cshtml"
                Write(Html.Hidden("assembly"));


            #line default
            #line hidden

            #line 28 "..\..\Translation\Views\View.cshtml"



            #line default
            #line hidden

            #line 29 "..\..\Translation\Views\View.cshtml"
                Write(Html.Hidden("culture"));


            #line default
            #line hidden

            #line 29 "..\..\Translation\Views\View.cshtml"



            #line default
            #line hidden

            #line 30 "..\..\Translation\Views\View.cshtml"
                Write(Html.TextBox("filter", (string)ViewBag.Filter));


            #line default
            #line hidden

            #line 30 "..\..\Translation\Views\View.cshtml"
                ;



            #line default
            #line hidden
                WriteLiteral("        <input");

                WriteLiteral(" type=\"hidden\"");

                WriteLiteral(" name=\"searchPressed\"");

                WriteLiteral(" value=\"true\"");

                WriteLiteral(" />\r\n");

                WriteLiteral("        <input");

                WriteLiteral(" type=\"submit\"");

                WriteAttribute("value", Tuple.Create(" value=\"", 1230), Tuple.Create("\"", 1279)

            #line 33 "..\..\Translation\Views\View.cshtml"
                               , Tuple.Create(Tuple.Create("", 1238), Tuple.Create <System.Object, System.Int32>(TranslationMessage.Search.NiceToString()

            #line default
            #line hidden
                                                                                                                 , 1238), false)
                               );

                WriteLiteral(" />\r\n");


            #line 34 "..\..\Translation\Views\View.cshtml"
            }


            #line default
            #line hidden
            WriteLiteral("</div>\r\n\r\n");


            #line 37 "..\..\Translation\Views\View.cshtml"
            if (Model == null)
            {
            #line default
            #line hidden
                WriteLiteral("    <em>");


            #line 39 "..\..\Translation\Views\View.cshtml"
                Write(TranslationMessage.PressSearchForResults.NiceToString());


            #line default
            #line hidden
                WriteLiteral("</em>\r\n");


            #line 40 "..\..\Translation\Views\View.cshtml"
            }
            else
            {
                var defaultLocAssembly = Model.GetOrThrow(defaultCulture);
                var filter             = (string)ViewBag.Filter;
                var all = string.IsNullOrEmpty(filter);

                var types = defaultLocAssembly.Types.Values.Where(lt => all || Model.Values.Any(la => la.Types[lt.Type].Contains(filter))).ToList();

                if (types.IsEmpty())
                {
            #line default
            #line hidden
                    WriteLiteral("        <strong>");


            #line 51 "..\..\Translation\Views\View.cshtml"
                    Write(TranslationMessage.NoResultsFound.NiceToString());


            #line default
            #line hidden
                    WriteLiteral("</strong>\r\n");


            #line 52 "..\..\Translation\Views\View.cshtml"
                }
                else
                {
                    using (Html.BeginForm((TranslationController tc) => tc.SaveView(assembly.GetName().Name, culture == null ? null : culture.Name, filter)))
                    {
            #line default
            #line hidden
                        WriteLiteral("            <table");

                        WriteLiteral(" id=\"results\"");

                        WriteLiteral(" style=\"width: 100%; margin: 0px\"");

                        WriteLiteral(" class=\"st\"");

                        WriteAttribute("pluralandgender", Tuple.Create(" pluralandgender=\"", 2072), Tuple.Create("\"", 2153)

            #line 59 "..\..\Translation\Views\View.cshtml"
                                       , Tuple.Create(Tuple.Create("", 2090), Tuple.Create <System.Object, System.Int32>(Url.Action((TranslationController tc) => tc.PluralAndGender())

            #line default
            #line hidden
                                                                                                                         , 2090), false)
                                       );

                        WriteLiteral(">\r\n");


            #line 60 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 60 "..\..\Translation\Views\View.cshtml"
                        foreach (var defaultLocType in types)
                        {
                            bool hasDescription = defaultLocType.Options.IsSet(DescriptionOptions.Description);

                            bool hasPlural = defaultLocType.Options.IsSet(DescriptionOptions.PluralDescription);

                            bool hasGenderOption = defaultLocType.Options.IsSet(DescriptionOptions.Gender);

                            bool hasMembers = defaultLocType.Options.IsSet(DescriptionOptions.Members);



            #line default
            #line hidden
                            WriteLiteral("                    <thead>\r\n                        <tr>\r\n                      " +
                                         "      <th");

                            WriteLiteral(" class=\"leftCell\"");

                            WriteLiteral(">");


            #line 73 "..\..\Translation\Views\View.cshtml"
                            Write(TranslationMessage.Type.NiceToString());


            #line default
            #line hidden
                            WriteLiteral("</th>\r\n                            <th");

                            WriteLiteral(" colspan=\"4\"");

                            WriteLiteral(" class=\"titleCell\"");

                            WriteLiteral(">");


            #line 74 "..\..\Translation\Views\View.cshtml"
                            Write(defaultLocType.Type.Name);


            #line default
            #line hidden
                            WriteLiteral(" (");


            #line 74 "..\..\Translation\Views\View.cshtml"
                            Write("/".Combine(hasDescription ? "Singular" : null, hasPlural ? "Plural" : null, hasGenderOption ? "Gender" : null, hasMembers ? "Members" : null));


            #line default
            #line hidden
                            WriteLiteral(")</th>\r\n                        </tr>\r\n                    </thead>\r\n");


            #line 77 "..\..\Translation\Views\View.cshtml"

                            if (defaultLocType.Options.IsSet(DescriptionOptions.Description))
                            {
                                foreach (var locType in Model.Values.Select(la => la.Types[defaultLocType.Type])
                                         .Where(lt => editCulture(lt.Assembly.Culture) || lt.Description.HasText())
                                         .Where(lt => all || lt.ContainsDescription(filter)))
                                {
                                    bool hasGender = hasGenderOption && NaturalLanguageTools.HasGenders(locType.Assembly.Culture);



            #line default
            #line hidden
                                    WriteLiteral("                            <tr>\r\n                                <th");

                                    WriteLiteral(" class=\"leftCell\"");

                                    WriteLiteral(">");


            #line 87 "..\..\Translation\Views\View.cshtml"
                                    Write(locType.Assembly.Culture.Name);


            #line default
            #line hidden
                                    WriteLiteral("</th>\r\n                                <th");

                                    WriteLiteral(" class=\"smallCell monospaceCell\"");

                                    WriteLiteral(">\r\n");


            #line 89 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 89 "..\..\Translation\Views\View.cshtml"
                                    if (hasGender)
                                    {
                                        if (editCulture(locType.Assembly.Culture))
                                        {
                                            var gd = NaturalLanguageTools.GenderDetectors.TryGetC(locType.Assembly.Culture.TwoLetterISOLanguageName);

                                            var list = gd?.Pronoms.EmptyIfNull()
                                                       .Select(pi => new SelectListItem {
                                                Value = pi.Gender.ToString(), Text = pi.Singular, Selected = pi.Gender == locType.Gender
                                            }).ToList();

                                            if (locType.Gender == null)
                                            {
                                                list.Insert(0, new SelectListItem {
                                                    Value = "", Text = "-", Selected = true
                                                });
                                            }


            #line default
            #line hidden

            #line 102 "..\..\Translation\Views\View.cshtml"
                                            Write(Html.SafeDropDownList(locKey(locType) + ".Gender", list));


            #line default
            #line hidden

            #line 102 "..\..\Translation\Views\View.cshtml"
                                            ;
                                        }
                                        else
                                        {
            #line default
            #line hidden

            #line 106 "..\..\Translation\Views\View.cshtml"
                                            Write(locType.Gender != null ? NaturalLanguageTools.GetPronom(locType.Gender.Value, plural: false, culture: locType.Assembly.Culture) : "-");


            #line default
            #line hidden

            #line 106 "..\..\Translation\Views\View.cshtml"
                                        }
                                    }


            #line default
            #line hidden
                                    WriteLiteral("                                </th>\r\n                                <th");

                                    WriteLiteral(" class=\"monospaceCell\"");

                                    WriteLiteral(">\r\n");


            #line 111 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 111 "..\..\Translation\Views\View.cshtml"
                                    if (editCulture(locType.Assembly.Culture))
                                    {
            #line default
            #line hidden

            #line 113 "..\..\Translation\Views\View.cshtml"
                                        Write(Html.TextArea(locKey(locType) + ".Description", locType.Description, new { style = "width:90%;" }));


            #line default
            #line hidden

            #line 113 "..\..\Translation\Views\View.cshtml"
                                    }
                                    else
                                    {
            #line default
            #line hidden

            #line 117 "..\..\Translation\Views\View.cshtml"
                                        Write(locType.Description);


            #line default
            #line hidden

            #line 117 "..\..\Translation\Views\View.cshtml"
                                    }


            #line default
            #line hidden
                                    WriteLiteral("                                </th>\r\n                                <th");

                                    WriteLiteral(" class=\"smallCell\"");

                                    WriteLiteral(">\r\n");


            #line 121 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 121 "..\..\Translation\Views\View.cshtml"
                                    if (hasPlural && hasGender)
                                    {
            #line default
            #line hidden

            #line 123 "..\..\Translation\Views\View.cshtml"
                                        Write(locType.Gender != null ? NaturalLanguageTools.GetPronom(locType.Gender.Value, plural: true, culture: locType.Assembly.Culture) : "-");


            #line default
            #line hidden

            #line 123 "..\..\Translation\Views\View.cshtml"
                                    }


            #line default
            #line hidden
                                    WriteLiteral("                                </th>\r\n                                <th");

                                    WriteLiteral(" class=\"monospaceCell\"");

                                    WriteLiteral(">\r\n");


            #line 127 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 127 "..\..\Translation\Views\View.cshtml"
                                    if (hasPlural)
                                    {
                                        if (editCulture(locType.Assembly.Culture))
                                        {
            #line default
            #line hidden

            #line 131 "..\..\Translation\Views\View.cshtml"
                                            Write(Html.TextArea(locKey(locType) + ".PluralDescription", locType.PluralDescription, new { style = "width:90%;" }));


            #line default
            #line hidden

            #line 131 "..\..\Translation\Views\View.cshtml"
                                        }
                                        else
                                        {
            #line default
            #line hidden

            #line 135 "..\..\Translation\Views\View.cshtml"
                                            Write(locType.PluralDescription);


            #line default
            #line hidden

            #line 135 "..\..\Translation\Views\View.cshtml"
                                        }
                                    }


            #line default
            #line hidden
                                    WriteLiteral("                                </th>\r\n                            </tr>\r\n");


            #line 140 "..\..\Translation\Views\View.cshtml"
                                }
                            }


                            if (defaultLocType.Options.IsSet(DescriptionOptions.Members))
                            {
                                foreach (string key in defaultLocType.Members.Keys.Where(k => all || k.Contains(filter, StringComparison.InvariantCultureIgnoreCase) ||
                                                                                         Model.Values.Select(la => la.Types[defaultLocType.Type]).Any(t => t.Members.ContainsKey(k) && t.Members[k].Contains(filter, StringComparison.InvariantCultureIgnoreCase))))
                                {
            #line default
            #line hidden
                                    WriteLiteral("                            <tr>\r\n                                <th");

                                    WriteLiteral(" class=\"leftCell\"");

                                    WriteLiteral(">\r\n");

                                    WriteLiteral("                                    ");


            #line 151 "..\..\Translation\Views\View.cshtml"
                                    Write(TranslationMessage.Member.NiceToString());


            #line default
            #line hidden
                                    WriteLiteral("\r\n                                </th>\r\n                                <th");

                                    WriteLiteral(" colspan=\"4\"");

                                    WriteLiteral(">\r\n");

                                    WriteLiteral("                                    ");


            #line 154 "..\..\Translation\Views\View.cshtml"
                                    Write(key);


            #line default
            #line hidden
                                    WriteLiteral("\r\n                                </th>\r\n                            </tr>\r\n");


            #line 157 "..\..\Translation\Views\View.cshtml"

                                    foreach (var locType in Model.Values.Select(la => la.Types[defaultLocType.Type]).Where(lt => editCulture(lt.Assembly.Culture) || lt.Members.ContainsKey(key)))
                                    {
            #line default
            #line hidden
                                        WriteLiteral("                                <tr>\r\n                                    <td");

                                        WriteLiteral(" class=\"leftCell\"");

                                        WriteLiteral(">");


            #line 161 "..\..\Translation\Views\View.cshtml"
                                        Write(locType.Assembly.Culture.Name);


            #line default
            #line hidden
                                        WriteLiteral("</td>\r\n                                    <td");

                                        WriteLiteral(" colspan=\"4\"");

                                        WriteLiteral(" class=\"monospaceCell\"");

                                        WriteLiteral(">\r\n\r\n");


            #line 164 "..\..\Translation\Views\View.cshtml"


            #line default
            #line hidden

            #line 164 "..\..\Translation\Views\View.cshtml"
                                        if (editCulture(locType.Assembly.Culture))
                                        {
            #line default
            #line hidden

            #line 166 "..\..\Translation\Views\View.cshtml"
                                            Write(Html.TextArea(locKey(locType) + ".Member." + key, locType.Members.TryGetC(key), new { style = "width:90%;" }));


            #line default
            #line hidden

            #line 166 "..\..\Translation\Views\View.cshtml"
                                        }
                                        else
                                        {
            #line default
            #line hidden

            #line 170 "..\..\Translation\Views\View.cshtml"
                                            Write(locType.Members.TryGetC(key));


            #line default
            #line hidden

            #line 170 "..\..\Translation\Views\View.cshtml"
                                        }


            #line default
            #line hidden
                                        WriteLiteral("                                    </td>\r\n                                </tr>\r" +
                                                     "\n");


            #line 174 "..\..\Translation\Views\View.cshtml"
                                    }
                                }
                            }
                        }


            #line default
            #line hidden
                        WriteLiteral("            </table>\r\n");

                        WriteLiteral("            <input");

                        WriteLiteral(" type=\"submit\"");

                        WriteAttribute("value", Tuple.Create(" value=\"", 9259), Tuple.Create("\"", 9306)

            #line 179 "..\..\Translation\Views\View.cshtml"
                                       , Tuple.Create(Tuple.Create("", 9267), Tuple.Create <System.Object, System.Int32>(TranslationMessage.Save.NiceToString()

            #line default
            #line hidden
                                                                                                                         , 9267), false)
                                       );

                        WriteLiteral(" />\r\n");


            #line 180 "..\..\Translation\Views\View.cshtml"
                    }
                }
            }


            #line default
            #line hidden
            WriteLiteral("\r\n<script>\r\n    $(function () {\r\n");

            WriteLiteral("        ");


            #line 186 "..\..\Translation\Views\View.cshtml"
            Write(Signum.Web.Translation.TranslationClient.Module["fixTextAreas"]());


            #line default
            #line hidden
            WriteLiteral("\r\n    });\r\n</script>\r\n\r\n");
        }
Пример #2
0
        public override void Execute()
        {
            #line 10 "..\..\Translation\Views\Sync.cshtml"

            CultureInfo       culture      = ViewBag.Culture;
            int               totalTypes   = ViewBag.TotalTypes;
            Lite <RoleEntity> selectedRole = ViewBag.Role;

            ViewBag.Title = TranslationMessage.Synchronize0In1.NiceToString().FormatWith(Model.LocalizedAssembly.Assembly.GetName().Name, Model.LocalizedAssembly.Culture.DisplayName);

            if (Model.Types.Count < totalTypes)
            {
                ViewBag.Title = ViewBag.Title + " [{0}/{1} {2}]".FormatWith(Model.Types.Count, totalTypes, selectedRole);
            }

            Func <IEnumerable <string>, List <SelectListItem> > selectListItems = values =>
            {
                var items = values.Select(s => new SelectListItem {
                    Value = s, Text = s
                }).ToList();

                if (values.Count() > 1 && values.Distinct().Count() == 1 || TranslationClient.Translator.AutoSelect())
                {
                    items.First().Selected = true;
                    items.Insert(0, new SelectListItem {
                        Value = "", Text = "-"
                    });
                }
                else
                {
                    items.Insert(0, new SelectListItem {
                        Value = "", Text = "-", Selected = true
                    });
                }

                return(items);
            };

            Func <LocalizedType, string> locKey = lt => lt.Type.Name + "." + lt.Assembly.Culture.Name;


            #line default
            #line hidden
            WriteLiteral("\r\n\r\n");


            #line 42 "..\..\Translation\Views\Sync.cshtml"
            Write(Html.ScriptCss("~/Translation/Content/Translation.css"));


            #line default
            #line hidden
            WriteLiteral("\r\n\r\n");


            #line 44 "..\..\Translation\Views\Sync.cshtml"
            if (Model.Types.IsEmpty())
            {
            #line default
            #line hidden
                WriteLiteral("    <h2>");


            #line 46 "..\..\Translation\Views\Sync.cshtml"
                Write(TranslationMessage._0AlreadySynchronized.NiceToString().FormatWith(Model.LocalizedAssembly.Assembly.GetName().Name));


            #line default
            #line hidden
                WriteLiteral("</h2>\r\n");


            #line 47 "..\..\Translation\Views\Sync.cshtml"
            }
            else
            {
            #line default
            #line hidden
                WriteLiteral("    <h2>");


            #line 50 "..\..\Translation\Views\Sync.cshtml"
                Write(ViewBag.Title);


            #line default
            #line hidden
                WriteLiteral("</h2>\r\n");


            #line 51 "..\..\Translation\Views\Sync.cshtml"

                using (Html.BeginForm((TranslationController c) => c.SaveSync(Model.LocalizedAssembly.Assembly.GetName().Name, culture.Name)))
                {
            #line default
            #line hidden
                    WriteLiteral("        <table");

                    WriteLiteral(" id=\"results\"");

                    WriteLiteral(" style=\"width: 100%; margin: 0px\"");

                    WriteLiteral(" class=\"st\"");

                    WriteLiteral("\r\n               data-pluralandgender=\"");


            #line 55 "..\..\Translation\Views\Sync.cshtml"
                    Write(Url.Action((TranslationController tc) => tc.PluralAndGender()));


            #line default
            #line hidden
                    WriteLiteral("\"");

                    WriteLiteral("\r\n               data-feedback=\"");


            #line 56 "..\..\Translation\Views\Sync.cshtml"
                    Write(Url.Action("Feedback", "Translation"));


            #line default
            #line hidden
                    WriteLiteral("\"");

                    WriteLiteral("\r\n               data-culture=\"");


            #line 57 "..\..\Translation\Views\Sync.cshtml"
                    Write(culture.Name);


            #line default
            #line hidden
                    WriteLiteral("\"");

                    WriteLiteral(">\r\n");


            #line 58 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 58 "..\..\Translation\Views\Sync.cshtml"
                    foreach (var typeChanges in Model.Types)
                    {
            #line default
            #line hidden
                        WriteLiteral("                <thead>\r\n                    <tr>\r\n                        <th");

                        WriteLiteral(" class=\"leftCell\"");

                        WriteLiteral(">");


            #line 62 "..\..\Translation\Views\Sync.cshtml"
                        Write(TranslationMessage.Type.NiceToString());


            #line default
            #line hidden
                        WriteLiteral("</th>\r\n                        <th");

                        WriteLiteral(" colspan=\"4\"");

                        WriteLiteral(" class=\"titleCell\"");

                        WriteLiteral(">");


            #line 63 "..\..\Translation\Views\Sync.cshtml"
                        Write(typeChanges.Type.Type.Name);


            #line default
            #line hidden
                        WriteLiteral("</th>\r\n                    </tr>\r\n                </thead>\r\n");


            #line 66 "..\..\Translation\Views\Sync.cshtml"

                        if (typeChanges.TypeConflict != null)
                        {
                            bool hasGenderOption = typeChanges.Type.Options.IsSet(DescriptionOptions.Gender);
                            bool hasPlural       = typeChanges.Type.Options.IsSet(DescriptionOptions.PluralDescription);

                            foreach (var tc in typeChanges.TypeConflict)
                            {
                                var locType = tc.Value.Original;

                                var hasGender = hasGenderOption && NaturalLanguageTools.HasGenders(tc.Key);


            #line default
            #line hidden
                                WriteLiteral("                        <tr>\r\n                            <th");

                                WriteLiteral(" class=\"leftCell\"");

                                WriteLiteral(">");


            #line 79 "..\..\Translation\Views\Sync.cshtml"
                                Write(tc.Key.Name);


            #line default
            #line hidden
                                WriteLiteral("</th>\r\n                            <th");

                                WriteLiteral(" class=\"smallCell monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 81 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 81 "..\..\Translation\Views\Sync.cshtml"
                                if (hasGender)
                                {
            #line default
            #line hidden

            #line 83 "..\..\Translation\Views\Sync.cshtml"
                                    Write(locType.Gender != null ? NaturalLanguageTools.GetPronom(locType.Gender.Value, plural: false, culture: locType.Assembly.Culture) : "-");


            #line default
            #line hidden

            #line 83 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"monospaceCell\"");

                                WriteLiteral(">\r\n");

                                WriteLiteral("                                ");


            #line 87 "..\..\Translation\Views\Sync.cshtml"
                                Write(locType.Description);


            #line default
            #line hidden
                                WriteLiteral("\r\n                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"smallCell monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 90 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 90 "..\..\Translation\Views\Sync.cshtml"
                                if (hasGender && hasPlural)
                                {
            #line default
            #line hidden

            #line 92 "..\..\Translation\Views\Sync.cshtml"
                                    Write(locType.Gender != null ? NaturalLanguageTools.GetPronom(locType.Gender.Value, plural: true, culture: locType.Assembly.Culture) : "-");


            #line default
            #line hidden

            #line 92 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 96 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 96 "..\..\Translation\Views\Sync.cshtml"
                                if (hasPlural)
                                {
            #line default
            #line hidden

            #line 98 "..\..\Translation\Views\Sync.cshtml"
                                    Write(locType.PluralDescription ?? "-");


            #line default
            #line hidden

            #line 98 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                            </th>\r\n                        </tr>\r\n");


            #line 102 "..\..\Translation\Views\Sync.cshtml"
                            }

                            {
                                var locType = typeChanges.Type;

                                var hasGender = hasGenderOption && NaturalLanguageTools.HasGenders(culture);



            #line default
            #line hidden
                                WriteLiteral("                        <tr>\r\n                            <th");

                                WriteLiteral(" class=\"leftCell\"");

                                WriteLiteral(">");


            #line 110 "..\..\Translation\Views\Sync.cshtml"
                                Write(culture.Name);


            #line default
            #line hidden
                                WriteLiteral("</th>\r\n                            <th");

                                WriteLiteral(" class=\"smallCell monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 112 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 112 "..\..\Translation\Views\Sync.cshtml"
                                if (hasGender)
                                {
                                    var gd = NaturalLanguageTools.GenderDetectors.TryGetC(locType.Assembly.Culture.TwoLetterISOLanguageName);

                                    var list = gd?.Pronoms.EmptyIfNull()
                                               .Select(pi => new SelectListItem {
                                        Value = pi.Gender.ToString(), Text = pi.Singular, Selected = pi.Gender == locType.Gender
                                    }).ToList();

                                    if (typeChanges.Type.Gender == null)
                                    {
                                        list.Insert(0, new SelectListItem {
                                            Value = "", Text = "-", Selected = true
                                        });
                                    }


            #line default
            #line hidden

            #line 123 "..\..\Translation\Views\Sync.cshtml"
                                    Write(Html.SafeDropDownList(locKey(typeChanges.Type) + ".Gender", list));


            #line default
            #line hidden

            #line 123 "..\..\Translation\Views\Sync.cshtml"
                                    ;
                                }


            #line default
            #line hidden
                                WriteLiteral("\r\n                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 128 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 128 "..\..\Translation\Views\Sync.cshtml"

                                var items = selectListItems(typeChanges.TypeConflict.Values.Select(a => a.Translated));

                                var elemName = locKey(typeChanges.Type) + ".Description";
                                if (items.Count == 1)
                                {
            #line default
            #line hidden
                                    WriteLiteral("                                    <textarea");

                                    WriteAttribute("name", Tuple.Create(" name=\"", 6201), Tuple.Create("\"", 6217)

            #line 134 "..\..\Translation\Views\Sync.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 6208), Tuple.Create <System.Object, System.Int32>(elemName

            #line default
            #line hidden
                                                                                                                                     , 6208), false)
                                                   );

                                    WriteLiteral(" style=\"width:90%\"");

                                    WriteLiteral(">");


            #line 134 "..\..\Translation\Views\Sync.cshtml"
                                    Write(items.First());


            #line default
            #line hidden
                                    WriteLiteral("</textarea>\r\n");

                                    WriteLiteral("                                    <button");

                                    WriteLiteral(" class=\"rememberChange\"");

                                    WriteLiteral(">");


            #line 135 "..\..\Translation\Views\Sync.cshtml"
                                    Write(TranslationJavascriptMessage.RememberChange.NiceToString());


            #line default
            #line hidden
                                    WriteLiteral("</button>\r\n");


            #line 136 "..\..\Translation\Views\Sync.cshtml"
                                }
                                else
                                {
            #line default
            #line hidden

            #line 139 "..\..\Translation\Views\Sync.cshtml"
                                    Write(Html.SafeDropDownList(elemName, items, new { style = "width:90%" }));


            #line default
            #line hidden

            #line 139 "..\..\Translation\Views\Sync.cshtml"
                                    ;


            #line default
            #line hidden
                                    WriteLiteral("                                    <a");

                                    WriteLiteral(" class=\"edit\"");

                                    WriteLiteral(">");


            #line 140 "..\..\Translation\Views\Sync.cshtml"
                                    Write(TranslationMessage.Edit.NiceToString());


            #line default
            #line hidden
                                    WriteLiteral("</a>\r\n");


            #line 141 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("\r\n\r\n                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"smallCell monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 146 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 146 "..\..\Translation\Views\Sync.cshtml"
                                if (hasGender && hasPlural)
                                {
            #line default
            #line hidden

            #line 148 "..\..\Translation\Views\Sync.cshtml"
                                    Write(locType.Gender != null ? NaturalLanguageTools.GetPronom(locType.Gender.Value, plural: true, culture: locType.Assembly.Culture) : "-");


            #line default
            #line hidden

            #line 148 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                            </th>\r\n                            <th");

                                WriteLiteral(" class=\"monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 152 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 152 "..\..\Translation\Views\Sync.cshtml"
                                if (hasPlural)
                                {
            #line default
            #line hidden

            #line 154 "..\..\Translation\Views\Sync.cshtml"
                                    Write(Html.TextArea(locKey(locType) + ".PluralDescription", locType.PluralDescription, new { style = "width:90%;" }));


            #line default
            #line hidden

            #line 154 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                            </th>\r\n                        </tr>\r\n");


            #line 158 "..\..\Translation\Views\Sync.cshtml"
                            }
                        }

                        {
                            var locType = typeChanges.Type;
                            foreach (var conflict in typeChanges.MemberConflicts)
                            {
            #line default
            #line hidden
                                WriteLiteral("                        <tr>\r\n                            <th");

                                WriteLiteral(" class=\"leftCell\"");

                                WriteLiteral(">\r\n");

                                WriteLiteral("                                ");


            #line 170 "..\..\Translation\Views\Sync.cshtml"
                                Write(TranslationMessage.Member.NiceToString());


            #line default
            #line hidden
                                WriteLiteral("\r\n                        </th>\r\n                        <th");

                                WriteLiteral(" colspan=\"4\"");

                                WriteLiteral(">\r\n");

                                WriteLiteral("                            ");


            #line 173 "..\..\Translation\Views\Sync.cshtml"
                                Write(conflict.Key);


            #line default
            #line hidden
                                WriteLiteral("\r\n                    </th>\r\n                </tr>\r\n");


            #line 176 "..\..\Translation\Views\Sync.cshtml"
                                foreach (var mc in conflict.Value)
                                {
            #line default
            #line hidden
                                    WriteLiteral("                            <tr>\r\n                                <td");

                                    WriteLiteral(" class=\"leftCell\"");

                                    WriteLiteral(">");


            #line 179 "..\..\Translation\Views\Sync.cshtml"
                                    Write(mc.Key.Name);


            #line default
            #line hidden
                                    WriteLiteral("</td>\r\n                                <td");

                                    WriteLiteral(" colspan=\"4\"");

                                    WriteLiteral(" class=\"monospaceCell\"");

                                    WriteLiteral(">\r\n");

                                    WriteLiteral("                                    ");


            #line 181 "..\..\Translation\Views\Sync.cshtml"
                                    Write(mc.Value.Original);


            #line default
            #line hidden
                                    WriteLiteral("\r\n\r\n                                </td>\r\n                            </tr>\r\n");


            #line 185 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("                        <tr>\r\n                            <td");

                                WriteLiteral(" class=\"leftCell\"");

                                WriteLiteral(">");


            #line 187 "..\..\Translation\Views\Sync.cshtml"
                                Write(culture.Name);


            #line default
            #line hidden
                                WriteLiteral("</td>\r\n                            <td");

                                WriteLiteral(" colspan=\"4\"");

                                WriteLiteral(" class=\"monospaceCell\"");

                                WriteLiteral(">\r\n");


            #line 189 "..\..\Translation\Views\Sync.cshtml"


            #line default
            #line hidden

            #line 189 "..\..\Translation\Views\Sync.cshtml"

                                var items    = selectListItems(conflict.Value.Values.Select(a => a.Translated));
                                var elemName = locKey(typeChanges.Type) + ".Member." + conflict.Key;
                                if (items.Count == 1)
                                {
            #line default
            #line hidden
                                    WriteLiteral("                            <textarea");

                                    WriteAttribute("name", Tuple.Create(" name=\"", 9093), Tuple.Create("\"", 9109)

            #line 194 "..\..\Translation\Views\Sync.cshtml"
                                                   , Tuple.Create(Tuple.Create("", 9100), Tuple.Create <System.Object, System.Int32>(elemName

            #line default
            #line hidden
                                                                                                                                     , 9100), false)
                                                   );

                                    WriteLiteral(" style=\"width:90%\"");

                                    WriteLiteral(">");


            #line 194 "..\..\Translation\Views\Sync.cshtml"
                                    Write(items.First());


            #line default
            #line hidden
                                    WriteLiteral("</textarea>\r\n");

                                    WriteLiteral("                                    <button");

                                    WriteLiteral(" class=\"rememberChange\"");

                                    WriteLiteral(">");


            #line 195 "..\..\Translation\Views\Sync.cshtml"
                                    Write(TranslationJavascriptMessage.RememberChange.NiceToString());


            #line default
            #line hidden
                                    WriteLiteral("</button>\r\n");


            #line 196 "..\..\Translation\Views\Sync.cshtml"
                                }
                                else
                                {
            #line default
            #line hidden

            #line 199 "..\..\Translation\Views\Sync.cshtml"
                                    Write(Html.SafeDropDownList(elemName, items));


            #line default
            #line hidden

            #line 199 "..\..\Translation\Views\Sync.cshtml"
                                    ;


            #line default
            #line hidden
                                    WriteLiteral("                                    <a");

                                    WriteLiteral(" class=\"edit\"");

                                    WriteLiteral(">");


            #line 200 "..\..\Translation\Views\Sync.cshtml"
                                    Write(TranslationMessage.Edit.NiceToString());


            #line default
            #line hidden
                                    WriteLiteral("</a>\r\n");


            #line 201 "..\..\Translation\Views\Sync.cshtml"
                                }


            #line default
            #line hidden
                                WriteLiteral("\r\n\r\n                            </td>\r\n                        </tr>\r\n");


            #line 206 "..\..\Translation\Views\Sync.cshtml"
                            }
                        }
                    }


            #line default
            #line hidden
                    WriteLiteral("        </table>\r\n");

                    WriteLiteral("        <input");

                    WriteLiteral(" type=\"submit\"");

                    WriteAttribute("value", Tuple.Create(" value=\"", 9777), Tuple.Create("\"", 9824)

            #line 210 "..\..\Translation\Views\Sync.cshtml"
                                   , Tuple.Create(Tuple.Create("", 9785), Tuple.Create <System.Object, System.Int32>(TranslationMessage.Save.NiceToString()

            #line default
            #line hidden
                                                                                                                     , 9785), false)
                                   );

                    WriteLiteral(" />\r\n");


            #line 211 "..\..\Translation\Views\Sync.cshtml"
                }
            }


            #line default
            #line hidden
            WriteLiteral("\r\n<script>\r\n    $(function () {\r\n");

            WriteLiteral("        ");


            #line 216 "..\..\Translation\Views\Sync.cshtml"
            Write(TranslationClient.Module["pluralAndGender"]());


            #line default
            #line hidden
            WriteLiteral("\r\n");

            WriteLiteral("        ");


            #line 217 "..\..\Translation\Views\Sync.cshtml"
            Write(TranslationClient.Module["editAndRemember"](TranslationClient.Translator is ITranslatorWithFeedback));


            #line default
            #line hidden
            WriteLiteral("\r\n");

            WriteLiteral("        ");


            #line 218 "..\..\Translation\Views\Sync.cshtml"
            Write(TranslationClient.Module["fixTextAreas"]());


            #line default
            #line hidden
            WriteLiteral("\r\n    });\r\n</script>\r\n");
        }